ansible.builtin.cs_pod (v2.3.2.0-1) — module

Manages pods on Apache CloudStack based clouds.

| "added in version" 2.1 of ansible.builtin"

Authors: René Moser (@resmo)

stableinterface | supported by community

Install Ansible via pip

Install with pip install ansible==2.3.2.0.post1

Description

Create, update, delete pods.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Ensure a pod is present
- local_action:
    module: 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Ensure a pod is disabled
- local_action:
    module: cs_pod
    name: pod1
    zone: ch-zrh-ix-01
    state: disabled
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Ensure a pod is enabled
- local_action:
    module: cs_pod
    name: pod1
    zone: ch-zrh-ix-01
    state: enabled
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Ensure a pod is absent
- local_action:
    module: cs_pod
    name: pod1
    zone: ch-zrh-ix-01
    state: absent

Inputs

    
id:
    default: null
    description:
    - uuid of the exising pod.
    required: false

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

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

state:
    choices:
    - present
    - enabled
    - disabled
    - absent
    default: present
    description:
    - State of the pod.
    required: false

end_ip:
    default: null
    description:
    - Ending IP address for the Pod.
    required: false

api_key:
    description:
    - API key of the CloudStack API.
    - If not given, the C(CLOUDSTACK_KEY) env variable is considered.
    required: true
    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.
    required: true
    type: str

gateway:
    default: null
    description:
    - Gateway for the Pod.
    - Required on C(state=present)
    required: false

netmask:
    default: null
    description:
    - Netmask for the Pod.
    - Required on C(state=present)
    required: false

start_ip:
    default: null
    description:
    - Starting IP address for the Pod.
    - Required on C(state=present)
    required: false

api_secret:
    description:
    - Secret key of the CloudStack API.
    - If not set, the C(CLOUDSTACK_SECRET) env variable is considered.
    required: true
    type: str

api_timeout:
    default: 10
    description:
    - HTTP timeout in seconds.
    - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered.
    type: int

api_http_method:
    choices:
    - get
    - post
    default: get
    description:
    - HTTP method used to query the API endpoint.
    - If not given, the C(CLOUDSTACK_METHOD) env variable is considered.
    type: str

api_verify_ssl_cert:
    description:
    - Verify CA authority cert file.
    - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered.
    type: str

Outputs

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