community.general.cs_pod (0.1.1) — module

Manages pods on Apache CloudStack based clouds.

Authors: René Moser (@resmo)

stableinterface | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Create, update, delete pods.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure a pod is present
  cs_pod:
    name: pod1
    zone: ch-zrh-ix-01
    start_ip: 10.100.10.101
    gateway: 10.100.10.1
    netmask: 255.255.255.0
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure a pod is disabled
  cs_pod:
    name: pod1
    zone: ch-zrh-ix-01
    state: disabled
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure a pod is enabled
  cs_pod:
    name: pod1
    zone: ch-zrh-ix-01
    state: enabled
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure a pod is absent
  cs_pod:
    name: pod1
    zone: ch-zrh-ix-01
    state: absent
  delegate_to: localhost

Inputs

    
id:
    description:
    - uuid of the existing pod.
    type: str

name:
    description:
    - Name of the pod.
    required: true
    type: str

zone:
    description:
    - Name of the zone in which the pod belongs to.
    - If not set, default zone is used.
    type: str

state:
    choices:
    - present
    - enabled
    - disabled
    - absent
    default: present
    description:
    - State of the pod.
    type: str

end_ip:
    description:
    - Ending IP address for the Pod.
    type: str

api_key:
    description:
    - API key of the CloudStack API.
    - If not given, the C(CLOUDSTACK_KEY) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

api_url:
    description:
    - URL of the CloudStack API e.g. https://cloud.example.com/client/api.
    - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

gateway:
    description:
    - Gateway for the Pod.
    - Required on I(state=present)
    type: str

netmask:
    description:
    - Netmask for the Pod.
    - Required on I(state=present)
    type: str

start_ip:
    description:
    - Starting IP address for the Pod.
    - Required on I(state=present)
    type: str

api_region:
    default: cloudstack
    description:
    - Name of the ini section in the C(cloustack.ini) file.
    - If not given, the C(CLOUDSTACK_REGION) env variable is considered.
    type: str

api_secret:
    description:
    - Secret key of the CloudStack API.
    - If not set, the C(CLOUDSTACK_SECRET) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

api_timeout:
    description:
    - HTTP timeout in seconds.
    - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    - Fallback value is 10 seconds if not specified.
    type: int

api_http_method:
    choices:
    - get
    - post
    description:
    - HTTP method used to query the API endpoint.
    - If not given, the C(CLOUDSTACK_METHOD) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    - Fallback value is C(get) if not specified.
    type: str

Outputs

allocation_state:
  description: State of the pod.
  returned: success
  sample: Enabled
  type: str
end_ip:
  description: Ending IP of the pod.
  returned: success
  sample: 10.100.1.254
  type: str
gateway:
  description: Gateway of the pod.
  returned: success
  sample: 10.100.1.1
  type: str
id:
  description: UUID of the pod.
  returned: success
  sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6
  type: str
name:
  description: Name of the pod.
  returned: success
  sample: pod01
  type: str
netmask:
  description: Netmask of the pod.
  returned: success
  sample: 255.255.255.0
  type: str
start_ip:
  description: Starting IP of the pod.
  returned: success
  sample: 10.100.1.101
  type: str
zone:
  description: Name of zone the pod is in.
  returned: success
  sample: ch-gva-2
  type: str