The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| ports  -  | A list of ports to expose. This is required when state is 'present' | |
| protocol  -  | 
 | The protocol that the public IP will listen for. | 
| server_ids  - / required  | A list of servers to create public ips on. | |
| state  -  | 
 | Determine whether to create or delete public IPs. If present module will not create a second public ip if one already exists. | 
| wait  boolean  | 
 | Whether to wait for the tasks to finish before returning. | 
Note
# 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
   Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | 
|---|---|---|
| server_ids  list  | success | The list of server ids that are changed Sample: ['UC1TEST-SVR01', 'UC1TEST-SVR02'] | 
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
    © 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
    https://docs.ansible.com/ansible/2.9/modules/clc_publicip_module.html