New in version 2.0.
- python = 2.7
- requests >= 2.5.0
- clc-sdk
parameter | required | default | choices | comments |
---|---|---|---|---|
description |
no | A description of the Server Group | ||
location |
no | Datacenter to create the group in. If location is not provided, the group gets created in the default datacenter associated with the account | ||
name |
yes | The name of the Server Group | ||
parent |
no | The parent group of the server group. If parent is not provided, it creates the group at top level. | ||
state |
no | present |
|
Whether to create or delete the group |
wait |
no | True |
|
Whether to wait for the tasks to finish before returning. |
# Create a Server Group --- - name: Create Server Group hosts: localhost gather_facts: False connection: local tasks: - name: Create / Verify a Server Group at CenturyLink Cloud clc_group: name: My Cool Server Group parent: Default Group state: present register: clc - name: debug debug: var: clc # Delete a Server Group --- - name: Delete Server Group hosts: localhost gather_facts: False connection: local tasks: - name: Delete / Verify Absent a Server Group at CenturyLink Cloud clc_group: name: My Cool Server Group parent: Default Group state: absent register: clc - name: debug debug: var: clc
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
group | The group information | success | dict | {'status': 'active', 'description': 'test group', 'links': [{'href': '/v2/groups/wfad', 'verbs': ['POST'], 'rel': 'createGroup'}, {'href': '/v2/servers/wfad', 'verbs': ['POST'], 'rel': 'createServer'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1', 'verbs': ['GET', 'PATCH', 'DELETE'], 'rel': 'self'}, {'href': '/v2/groups/wfad/086ac1dfe0b6411989e8d1b77c4065f0', 'id': '086ac1dfe0b6411989e8d1b77c4065f0', 'rel': 'parentGroup'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/defaults', 'verbs': ['GET', 'POST'], 'rel': 'defaults'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/billing', 'rel': 'billing'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/archive', 'rel': 'archiveGroupAction'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/statistics', 'rel': 'statistics'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/upcomingScheduledActivities', 'rel': 'upcomingScheduledActivities'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/horizontalAutoscalePolicy', 'verbs': ['GET', 'PUT', 'DELETE'], 'rel': 'horizontalAutoscalePolicyMapping'}, {'href': '/v2/groups/wfad/bb5f12a3c6044ae4ad0a03e73ae12cd1/scheduledActivities', 'verbs': ['GET', 'POST'], 'rel': 'scheduledActivities'}], 'changeInfo': {'modifiedBy': 'service.wfad', 'modifiedDate': '2015-07-29T18:52:47Z', 'createdBy': 'service.wfad', 'createdDate': '2015-07-29T18:52:47Z'}, 'locationId': 'UC1', 'groups': [], 'customFields': [], 'type': 'default', 'id': 'bb5f12a3c6044ae4ad0a03e73ae12cd1', 'name': 'test group'} |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.