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

New in version 2.2.

Synopsis

Parameters

Parameter Choices/Defaults Comments
pn_alias
Specify an alias for the interface.
pn_assignment
    Choices:
  • none
  • dhcp
  • dhcpv6
  • autov6
Specify the DHCP method for IP address assignment.
pn_clipassword
Provide login password if user is not root.
pn_cliswitch
Target switch to run the cli on.
pn_cliusername
Provide login username if user is not root.
pn_exclusive
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
    Choices:
  • mgmt
  • data
  • span
Specify if the interface is management, data or span interface.
pn_interface_ip
Specify the IP address of the interface in x.x.x.x/n format.
pn_l3port
Specify a Layer 3 port for the interface.
pn_nic_enable
Specify if the NIC is enabled or not
pn_nic_str
Specify the type of NIC. Used for vrouter-interface remove/modify.
pn_secondary_macs
Specify a secondary MAC address for the interface.
pn_vlan
Specify the VLAN identifier. This is a value between 1 and 4092.
pn_vrouter_name
required
Specify the name of the vRouter interface.
pn_vrrp_adv_int
Specify a VRRP advertisement interval in milliseconds. The range is from 30 to 40950 with a default value of 1000.
pn_vrrp_id
Specify the ID for the VRRP interface. The IDs on both vRouters must be the same IS number.
pn_vrrp_priority
Specify the priority for the VRRP interface. This is a value between 1 (lowest) and 255 (highest).
pn_vxlan
Specify the VXLAN identifier. This is a value between 1 and 16777215.
state
required
    Choices:
  • 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, the following are the fields unique to this module:

Key Returned Description
changed
bool
always
Indicates whether the CLI caused changes on the target.

command
str
always
The CLI command run on the target node(s).

stderr
str
on error
The set of error responses from the vrouterif command.

stdout
list
on success
The set of responses from the vrouterif command.



Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • Pluribus Networks (@amitsi)

Hint

If you notice any issues in this documentation you can edit this document to improve it.