community / community.general / 0.1.4 / module / clc_publicip Add and Delete public ips on servers in CenturyLink Cloud. Authors: CLC Runner (@clc-runner)community.general.clc_publicip (0.1.4) — module
Install with ansible-galaxy collection install community.general:==0.1.4
collections: - name: community.general version: 0.1.4
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