W3cubDocs

/Ansible

pn_vrouterif - CLI command to add/remove/modify vrouter-interface.

New in version 2.2.

Synopsis

Execute vrouter-interface-add, vrouter-interface-remove, vrouter-interface-modify command. You configure interfaces to vRouter services on a fabric, cluster, standalone switch or virtual network(VNET).

Options

parameter required default choices comments
pn_alias
no
Specify an alias for the interface.
pn_assignment
no
  • none
  • dhcp
  • dhcpv6
  • autov6
Specify the DHCP method for IP address assignment.
pn_clipassword
no
Provide login password if user is not root.
pn_cliswitch
no
Target switch to run the cli on.
pn_cliusername
no
Provide login username if user is not root.
pn_exclusive
no
Specify if the interface is exclusive to the configuration. Exclusive means that other configurations cannot use the interface. Exclusive is specified when you configure the interface as span interface and allows higher throughput through the interface.
pn_interface
no
  • mgmt
  • data
  • span
Specify if the interface is management, data or span interface.
pn_interface_ip
no
Specify the IP address of the interface in x.x.x.x/n format.
pn_l3port
no
Specify a Layer 3 port for the interface.
pn_nic_enable
no
Specify if the NIC is enabled or not
pn_nic_str
no
Specify the type of NIC. Used for vrouter-interface remove/modify.
pn_secondary_macs
no
Specify a secondary MAC address for the interface.
pn_vlan
no
Specify the VLAN identifier. This is a value between 1 and 4092.
pn_vrouter_name
yes
Specify the name of the vRouter interface.
pn_vrrp_adv_int
no
Specify a VRRP advertisement interval in milliseconds. The range is from 30 to 40950 with a default value of 1000.
pn_vrrp_id
no
Specify the ID for the VRRP interface. The IDs on both vRouters must be the same IS number.
pn_vrrp_priority
no
Specify the priority for the VRRP interface. This is a value between 1 (lowest) and 255 (highest).
pn_vxlan
no
Specify the VXLAN identifier. This is a value between 1 and 16777215.
state
yes
  • present
  • absent
  • update
State the action to perform. Use 'present' to add vrouter interface, 'absent' to remove vrouter interface and 'update' to modify vrouter interface.

Examples

- name: Add vrouter-interface
  pn_vrouterif:
    pn_cliusername: admin
    pn_clipassword: admin
    state: 'present'
    pn_vrouter_name: 'ansible-vrouter'
    pn_interface_ip: 101.101.101.2/24
    pn_vlan: 101

- name: Add VRRP..
  pn_vrouterif:
    pn_cliusername: admin
    pn_clipassword: admin
    state: 'present'
    pn_vrouter_name: 'ansible-vrouter'
    pn_interface_ip: 101.101.101.2/24
    pn_vrrp_ip: 101.101.101.1/24
    pn_vrrp_priority: 100
    pn_vlan: 101

- name: Remove vrouter-interface
  pn_vrouterif:
    pn_cliusername: admin
    pn_clipassword: admin
    state: 'absent'
    pn_vrouter_name: 'ansible-vrouter'
    pn_interface_ip: 101.101.101.2/24

Return Values

Common return values are documented here Common Return Values, the following are the fields unique to this module:

name description returned type sample
vrouterifcmd The CLI command run on the target node(s).
changed Indicates whether the CLI caused changes on the target. always bool
stderr/msg The set of error responses from the vrouterif command. on error str
stdout/msg The set of responses from the vrouterif command. on success list

This is a Core Module

For more information on what this means please read Core Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/pn_vrouterif_module.html