community / community.general / 0.1.1 / module / clc_aa_policy Create or Delete Anti Affinity Policies at CenturyLink Cloud. Authors: CLC Runner (@clc-runner) preview | supported by communitycommunity.general.clc_aa_policy (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
An Ansible module to Create or Delete Anti Affinity Policies at CenturyLink Cloud.
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples --- - name: Create AA Policy hosts: localhost gather_facts: False connection: local tasks: - name: Create an Anti Affinity Policy clc_aa_policy: name: Hammer Time location: UK3 state: present register: policy - name: debug debug: var: policy
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples --- - name: Create AA Policy hosts: localhost gather_facts: False connection: local tasks: - name: Create an Anti Affinity Policy clc_aa_policy: name: Hammer Time location: UK3 state: present register: policy - name: debug debug: var: policy --- - name: Delete AA Policy hosts: localhost gather_facts: False connection: local tasks: - name: Delete an Anti Affinity Policy clc_aa_policy: name: Hammer Time location: UK3 state: absent register: policy - name: debug debug: var: policy
name: description: - The name of the Anti Affinity Policy. required: true wait: description: - This option does nothing and will be removed in Ansible 2.14. type: bool state: choices: - present - absent default: present description: - Whether to create or delete the policy. required: false location: description: - Datacenter in which the policy lives/should live. required: true
policy: description: The anti affinity policy information returned: success sample: id: 1a28dd0988984d87b9cd61fa8da15424 links: - href: /v2/antiAffinityPolicies/wfad/1a28dd0988984d87b9cd61fa8da15424 rel: self verbs: - GET - DELETE - PUT - href: /v2/datacenters/wfad/UC1 id: uc1 name: UC1 - US West (Santa Clara) rel: location location: UC1 name: test_aa_policy type: dict