New in version 2.0.
- python = 2.7
- requests >= 2.5.0
- clc-sdk
parameter | required | default | choices | comments |
---|---|---|---|---|
ports |
no | None | A list of ports to expose. This is required when state is 'present' | |
protocol |
no | TCP |
|
The protocol that the public IP will listen for. |
server_ids |
yes | A list of servers to create public ips on. | ||
state |
no | present |
|
Determine whether to create or delete public IPs. If present module will not create a second public ip if one already exists. |
wait |
no | True |
|
Whether to wait for the tasks to finish before returning. |
# 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 Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
server_ids | The list of server ids that are changed | success | list | ['UC1TEST-SVR01', 'UC1TEST-SVR02'] |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.