server_group
Manages server groups on the cloudscale.ch IaaS service
Collection: cloudscale_ch.cloud
Full Name: cloudscale_ch.cloud.server_group
Synopsis
Manages server groups on the cloudscale.ch IaaS service
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| api_url | str | Cloudscale API URL; defaults from CLOUDSCALE_API_URL or https://api.cloudscale.ch/v1. | ||
| api_token | str | API bearer token; defaults from CLOUDSCALE_API_TOKEN. | ||
| api_timeout | int | Request timeout seconds; defaults from CLOUDSCALE_API_TIMEOUT or 45. | ||
| name | str | Name of the server group. Either I(name) or I(uuid) is required. These options are mutually exclusive. | ||
| state | str | present | State of the server group. | |
| tags | dict | Tags assosiated with the server groups. Set this to C({}) to clear any tags. | ||
| type | str | anti-affinity | Type of the server group. | |
| uuid | str | UUID of the server group. Either I(name) or I(uuid) is required. These options are mutually exclusive. | ||
| zone | str | Zone slug of the server group (e.g. C(lpg1) or C(rma1)). |
Example
yaml
- name: Ensure server group exists
cloudscale_ch.cloud.server_group:
name: my-name
type: anti-affinity
api_token: xxxxxx
- name: Ensure server group in a specific zone
cloudscale_ch.cloud.server_group:
name: my-rma-group
type: anti-affinity
zone: lpg1
api_token: xxxxxx
- name: Ensure a server group is absent
cloudscale_ch.cloud.server_group:
name: my-name
state: absent
api_token: xxxxxx