- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# pn_vrouterif – CLI command to add/remove/modify vrouter-interface

- DEPRECATED
- Synopsis
- Parameters
- Examples
- Return Values
- Status

## DEPRECATED

Removed in Ansible:
| version: 2.12
Why: | Doesn’t support latest Pluribus Networks netvisor
Alternative: | Latest modules will be pushed in Ansible future versions.

## 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).

## 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 - | Default: "local" | Target switch to run the cli on.
pn_cliusername - |  | Provide login username if user is not root.
pn_exclusive boolean | Choices: no yes | 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 boolean | Choices: no yes | 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 boolean | always | Indicates whether the CLI caused changes on the target.
command string | always | The CLI command run on the target node(s).
stderr string | 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 will be removed in version 2.12. [deprecated]
- For more information see DEPRECATED.

### Authors

- Pluribus Networks (@amitsi)

Hint

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