phoenixnap / phoenixnap.bmc / 1.17.0 / module / public_network_ip_block add/remove an IP block from a public network. | "added in version" 1.11.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.public_network_ip_block (1.17.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0
collections: - name: phoenixnap.bmc version: 1.17.0
add/remove an IP block from a public network.
This module has a dependency on requests
API is documented at U(https://developers.phoenixnap.com/docs/networks/1/overview).
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret' # in location: ~/.pnap/config.yaml - name: Add an IP block to public network. hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: Add an IP block to public network. phoenixnap.bmc.public_network_ip_block: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" public_network_id: e6afba51-7de8-4080-83ab-0f915570659c ip_block_id: 60473a6115e34466c9f8f083 state: present register: output - name: Print the public network information ansible.builtin.debug: var: output.public_network_ip_block
- name: Remove an IP block from public network. hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: Remove an IP block from public network. phoenixnap.bmc.public_network_ip_block: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" public_network_id: e6afba51-7de8-4080-83ab-0f915570659c ip_block_id: 60473a6115e34466c9f8f083 state: absent register: output - name: Print the public network information ansible.builtin.debug: var: output.public_network_ip_block
force: default: false description: parameter controlling advanced features availability. type: bool state: choices: - present - absent default: present description: Indicate desired state of the target. type: str client_id: description: Client ID (Application Management) type: str ip_block_id: description: The IP Block identifier. required: true type: str client_secret: description: Client Secret (Application Management) type: str public_network_id: description: The Public Network identifier. required: true type: str
public_network_ip_block: contains: id: description: The IP Block identifier. returned: always sample: 60473a6115e34466c9f8f083 type: str description: The specified IP block information returned: success type: complex