phoenixnap.bmc.network_info (1.4.0) — module

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 certified

Install collection

Install with ansible-galaxy collection install phoenixnap.bmc:==1.4.0


Add to requirements.yml

  collections:
    - name: phoenixnap.bmc
      version: 1.4.0

Description

Gather information about networks available.

This module has a dependency on requests

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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

Inputs

    
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

Outputs

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