phoenixnap / phoenixnap.bmc / 1.17.0 / module / private_network_info Gather information about phoenixNAP BMC private networks | "added in version" 0.11.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.private_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 private 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 private networks hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List all private networks information for account phoenixnap.bmc.private_network_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" register: output - name: Print the gathered infos ansible.builtin.debug: var: output.private_networks
- name: List the private network details hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List private networks information based on the specified names phoenixnap.bmc.private_network_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" names: [My Default Backend Network] register: output - name: Print the gathered infos ansible.builtin.debug: var: output.private_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 Private Networks. type: str client_id: description: Client ID (Application Management) type: str client_secret: description: Client Secret (Application Management) type: str
private_networks: contains: cidr: description: IP range associated with this private network in CIDR notation. returned: always sample: 10.0.0.0/24 type: str createdOn: description: Date and time when this private network was created. returned: always type: str description: description: The description of this private network.. returned: always sample: Further details on the network type: str id: description: The private network identifier. returned: always sample: 604721852cf65253d151528b type: str location: description: The location of this private network. returned: always sample: PHX type: str locationDefault: description: Identifies network as the default private network for the specified location. returned: always sample: true type: bool memberships: contains: ips: description: List of IPs associated to the resource elements: str example: - 10.111.14.104 - 10.111.14.105 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 of this private network. returned: always type: list name: description: The friendly name of this private network. returned: always sample: Sample Network type: str status: description: The status of the private network. sample: READY type: str type: description: The type of the private network. returned: always sample: PRIVATE type: str vlanId: description: The VLAN of this private network. returned: always sample: 10 type: str description: The private networks information as list returned: success type: complex