phoenixnap / phoenixnap.bmc / 1.4.0 / module / network_info Gather information about phoenixNAP BMC 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.network_info (1.4.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.4.0
collections: - name: phoenixnap.bmc version: 1.4.0
Gather information about 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 # List all networks information for account - name: List all networks hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml collections: - phoenixnap.bmc tasks: - phoenixnap.bmc.network_info: client_id: "{{clientId}}" client_secret: "{{clientSecret}}" register: output - name: Print the gathered infos debug: var: output.networks
# List networks information based on the specified names - name: List the network details hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml collections: - phoenixnap.bmc tasks: - phoenixnap.bmc.network_info: client_id: "{{clientId}}" client_secret: "{{clientSecret}}" names: [My Default Backend Network] register: output - name: Print the gathered infos debug: var: output.networks
names: description: The friendly name of this private network. elements: str type: list client_id: description: Client ID (Application Management) type: str client_secret: description: Client Secret (Application Management) type: str
networks: contains: cidr: description: IP range associated with this private network in CIDR notation. returned: always sample: 10.0.0.0/24 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 name: description: The friendly name of this private network. returned: always sample: Sample Network type: str servers: description: Server details linked to the Private Network returned: always 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 networks information as list returned: success type: complex