ansible / ansible.builtin / v2.8.20 / module / clc_publicip Add and Delete public ips on servers in CenturyLink Cloud. | "added in version" 2.0 of ansible.builtin" Authors: CLC Runner (@clc-runner) preview | supported by communityansible.builtin.clc_publicip (v2.8.20) — module
pip
Install with pip install ansible==2.8.20
An Ansible module to add or delete public ip addresses on an existing server or servers in CenturyLink Cloud.
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples - name: Add Public IP to Server hosts: localhost gather_facts: False connection: local tasks: - name: Create Public IP For Servers clc_publicip: protocol: TCP ports: - 80 server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 state: present register: clc - name: debug debug: var: clc
- name: Delete Public IP from Server hosts: localhost gather_facts: False connection: local tasks: - name: Create Public IP For Servers clc_publicip: server_ids: - UC1TEST-SVR01 - UC1TEST-SVR02 state: absent register: clc - name: debug debug: var: clc
wait: default: 'yes' description: - Whether to wait for the tasks to finish before returning. type: bool ports: description: - A list of ports to expose. This is required when state is 'present' state: choices: - present - absent default: present description: - Determine whether to create or delete public IPs. If present module will not create a second public ip if one already exists. protocol: choices: - TCP - UDP - ICMP default: TCP description: - The protocol that the public IP will listen for. server_ids: description: - A list of servers to create public ips on. required: true
server_ids: description: The list of server ids that are changed returned: success sample: - UC1TEST-SVR01 - UC1TEST-SVR02 type: list