New in version 2.8.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| api_timeout - | Default: 30 | Timeout in seconds for calls to the cloudscale.ch API. |
| api_token - | cloudscale.ch API token. This can also be passed in the CLOUDSCALE_API_TOKEN environment variable. | |
| name string | Name of the server group. Either name or uuid is required. These options are mutually exclusive. | |
| state string |
| State of the server group. |
| tags dictionary added in 2.9 | Tags assosiated with the server groups. Set this to {} to clear any tags. | |
| type string | Default: "anti-affinity" | Type of the server group. |
| uuid string | UUID of the server group. Either name or uuid is required. These options are mutually exclusive. |
Note
CLOUDSCALE_API_TOKEN environment variable can be used.---
- name: Ensure server group exists
cloudscale_server_group:
name: my-name
type: anti-affinity
api_token: xxxxxx
- name: Ensure a server group is absent
cloudscale_server_group:
name: my-name
state: absent
api_token: xxxxxx
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description |
|---|---|---|
| href string | if available | API URL to get details about this server group Sample: https://api.cloudscale.ch/v1/server-group/cfde831a-4e87-4a75-960f-89b0148aa2cc |
| name string | always | The display name of the server group Sample: load balancers |
| servers list | if available | A list of servers that are part of the server group. |
| state string | always | State of the server group. Sample: present |
| tags dictionary added in 2.9 | success | Tags assosiated with the server group. Sample: {'project': 'my project'} |
| type string | if available | The type the server group Sample: anti-affinity |
| uuid string | always | The unique identifier for this server Sample: cfde831a-4e87-4a75-960f-89b0148aa2cc |
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/cloudscale_server_group_module.html