community.general.cloudscale_server_group (0.1.4) — module

Manages server groups on the cloudscale.ch IaaS service

Authors: René Moser (@resmo), Denis Krienbühl (@href)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.4

Description

Create, update and remove server groups.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Ensure server group exists
  cloudscale_server_group:
    name: my-name
    type: anti-affinity
    api_token: xxxxxx
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure server group in a specific zone
  cloudscale_server_group:
    name: my-rma-group
    type: anti-affinity
    zone: lpg1
    api_token: xxxxxx
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure a server group is absent
  cloudscale_server_group:
    name: my-name
    state: absent
    api_token: xxxxxx

Inputs

    
name:
    description:
    - Name of the server group.
    - Either I(name) or I(uuid) is required. These options are mutually exclusive.
    type: str

tags:
    description:
    - Tags assosiated with the server groups. Set this to C({}) to clear any tags.
    type: dict

type:
    default: anti-affinity
    description:
    - Type of the server group.
    type: str

uuid:
    description:
    - UUID of the server group.
    - Either I(name) or I(uuid) is required. These options are mutually exclusive.
    type: str

zone:
    description:
    - Zone slug of the server group (e.g. C(lgp1) or C(rma1)).
    type: str
    version_added: 0.2.0
    version_added_collection: community.general

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the server group.
    type: str

api_token:
    description:
    - cloudscale.ch API token.
    - This can also be passed in the C(CLOUDSCALE_API_TOKEN) environment variable.
    type: str

api_timeout:
    default: 30
    description:
    - Timeout in seconds for calls to the cloudscale.ch API.
    type: int

Outputs

href:
  description: API URL to get details about this server group
  returned: if available
  sample: https://api.cloudscale.ch/v1/server-group/cfde831a-4e87-4a75-960f-89b0148aa2cc
  type: str
name:
  description: The display name of the server group
  returned: always
  sample: load balancers
  type: str
servers:
  description: A list of servers that are part of the server group.
  returned: if available
  sample: []
  type: list
state:
  description: State of the server group.
  returned: always
  sample: present
  type: str
tags:
  description: Tags assosiated with the server group.
  returned: success
  sample:
    project: my project
  type: dict
type:
  description: The type the server group
  returned: if available
  sample: anti-affinity
  type: str
uuid:
  description: The unique identifier for this server
  returned: always
  sample: cfde831a-4e87-4a75-960f-89b0148aa2cc
  type: str
zone:
  description: The zone of the server group
  returned: success
  sample:
    slug: rma1
  type: dict
  version_added: 0.2.0
  version_added_collection: community.general