ansible / ansible.builtin / v2.9.27 / module / clc_aa_policy Create or Delete Anti Affinity Policies at CenturyLink Cloud. | "added in version" 2.0 of ansible.builtin" Authors: CLC Runner (@clc-runner) preview | supported by communityansible.builtin.clc_aa_policy (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
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: default: true description: - Whether to wait for the tasks to finish before returning. required: false 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