community.network.pn_vrouter_packet_relay module – CLI command to add/remove vrouter-packet-relay

Note

This module is part of the community.network collection (version 5.0.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.network.

To use it in a playbook, specify: community.network.pn_vrouter_packet_relay.

Synopsis

  • This module can be used to add packet relay configuration for DHCP on vrouter and remove packet relay configuration for DHCP on vrouter.

Aliases: network.netvisor.pn_vrouter_packet_relay

Parameters

Parameter

Comments

pn_cliswitch

string

Target switch to run the CLI on.

pn_forward_ip

string / required

forwarding IP address.

pn_forward_proto

string

protocol type to forward packets.

Choices:

  • "dhcp" ← (default)

pn_nic

string / required

NIC.

pn_vrouter_name

string / required

name of service config.

state

string

vrouter-packet-relay configuration command.

Choices:

  • "present" ← (default)

  • "absent"

Examples

- name: VRouter packet relay add
  community.network.pn_vrouter_packet_relay:
    pn_cliswitch: "sw01"
    pn_forward_ip: "192.168.10.1"
    pn_nic: "eth0.4092"
    pn_vrouter_name: "sw01-vrouter"

- name: VRouter packet relay remove
  community.network.pn_vrouter_packet_relay:
    pn_cliswitch: "sw01"
    state: "absent"
    pn_forward_ip: "192.168.10.1"
    pn_nic: "eth0.4092"
    pn_vrouter_name: "sw01-vrouter"

Return Values

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

Key

Description

changed

boolean

indicates whether the CLI caused changes on the target.

Returned: always

command

string

the CLI command run on the target node.

Returned: always

stderr

list / elements=string

set of error responses from the vrouter-packet-relay command.

Returned: on error

stdout

list / elements=string

set of responses from the vrouter-packet-relay command.

Returned: always

Authors

  • Pluribus Networks (@rajaspachipulusu17)