phoenixnap / phoenixnap.bmc / 1.17.0 / module / public_network_info Gather information about phoenixNAP BMC public networks | "added in version" 1.5.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.public_network_info (1.17.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0
collections: - name: phoenixnap.bmc version: 1.17.0
Gather information about public networks available.
This module has a dependency on requests
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret' # in location: ~/.pnap/config.yaml - name: List all networks hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List all public networks information for account phoenixnap.bmc.public_network_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" register: output - name: Print the gathered infos ansible.builtin.debug: var: output.public_networks
- name: List the network details hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List public networks information based on the specified names phoenixnap.bmc.public_network_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" names: Initial public network register: output - name: Print the gathered infos ansible.builtin.debug: var: output.public_networks
names: description: The friendly name of this private network. elements: str type: list location: description: If present will filter the result by the given location of the Public Networks. type: str client_id: description: Client ID (Application Management) type: str client_secret: description: Client Secret (Application Management) type: str
public_networks: contains: createdOn: description: Date and time when this public network was created. sample: '2022-04-05T13:50:30.491Z' type: str description: description: The description of this public network. sample: Further details on the network. type: str id: description: The public network identifier. sample: 604721852cf65253d151528b type: str ipBlocks: contains: id: description: The IP Block identifier. sample: 60473a6115e34466c9f8f083 type: str description: A list of IP Blocks that are associated with this public netwo type: list location: description: The location of this public network. sample: PHX type: str memberships: contains: ips: description: List of public IPs associated to the resource. elements: str sample: - 10.111.14.104 - 10.111.14.105 - 10.111.14.106 type: list resourceId: description: The resource identifier. sample: 603f3e995c18d515cda9c4f8 type: str resourceType: description: The resource's type. sample: server type: str description: A list of resources that are members in this public network. type: list name: description: The friendly name of this public network. sample: Sample Network type: str status: description: he status of the public network. sample: READY type: str vlanId: description: The VLAN of this public network. sample: 10 type: int description: Public ntworks information as list returned: success type: complex