Deprecated

Removed in 2.12

i

Reason:Doesn't support latest Pluribus Networks netvisor | Alternative:Latest modules will be pushed in Ansible future versions.

community.general.pn_vrouter (0.1.1) — module

CLI command to create/delete/modify a vrouter.

Authors: Pluribus Networks (@amitsi)

deprecated | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Execute vrouter-create, vrouter-delete, vrouter-modify command.

Each fabric, cluster, standalone switch, or virtual network (VNET) can provide its tenants with a virtual router (vRouter) service that forwards traffic between networks and implements Layer 3 protocols.

C(vrouter-create) creates a new vRouter service.

C(vrouter-delete) deletes a vRouter service.

C(vrouter-modify) modifies a vRouter service.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create vrouter
  pn_vrouter:
    state: 'present'
    pn_name: 'ansible-vrouter'
    pn_vnet: 'ansible-fab-global'
    pn_router_id: 208.74.182.1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete vrouter
  pn_vrouter:
    state: 'absent'
    pn_name: 'ansible-vrouter'

Inputs

    
state:
    choices:
    - present
    - absent
    - update
    description:
    - State the action to perform. Use 'present' to create vrouter, 'absent' to delete
      vrouter and 'update' to modify vrouter.
    required: true

pn_name:
    description:
    - Specify the name of the vRouter.
    required: true

pn_vnet:
    description:
    - Specify the name of the VNET.
    - Required for vrouter-create.

pn_bgp_as:
    description:
    - Specify the Autonomous System Number(ASN) if the vRouter runs Border Gateway Protocol(BGP).

pn_cliswitch:
    default: local
    description:
    - Target switch(es) to run the CLI on.
    required: false

pn_router_id:
    description:
    - Specify the vRouter IP address.

pn_hw_vrrp_id:
    description:
    - Specifies the VRRP ID for a hardware vrouter.

pn_bgp_options:
    description:
    - Specify other BGP options as a whitespaces separated string within single quotes
      ''.

pn_clipassword:
    description:
    - Provide login password if user is not root.
    required: false

pn_cliusername:
    description:
    - Provide login username if user is not root.
    required: false

pn_router_type:
    choices:
    - hardware
    - software
    description:
    - Specify if the vRouter uses software or hardware.
    - Note that if you specify hardware as router type, you cannot assign IP addresses
      using DHCP. You must specify a static IP address.

pn_ospf_options:
    description:
    - Specify other OSPF options as a whitespaces separated string within single quotes
      ''.

pn_service_type:
    choices:
    - dedicated
    - shared
    description:
    - Specify if the vRouter is a dedicated or shared VNET service.

pn_bgp_max_paths:
    description:
    - Specify the maximum number of paths for BGP. This is a number between 1 and 255
      or 0 to unset.

pn_service_state:
    choices:
    - enable
    - disable
    description:
    - Specify to enable or disable vRouter service.

pn_vrrp_track_port:
    description:
    - Specify list of ports and port ranges.

pn_bgp_redistribute:
    choices:
    - static
    - connected
    - rip
    - ospf
    description:
    - Specify how BGP routes are redistributed.

pn_rip_redistribute:
    choices:
    - static
    - connected
    - ospf
    - bgp
    description:
    - Specify how RIP routes are redistributed.

pn_ospf_redistribute:
    choices:
    - static
    - connected
    - bgp
    - rip
    description:
    - Specify how OSPF routes are redistributed.

Outputs

changed:
  description: Indicates whether the CLI caused changes on the target.
  returned: always
  type: bool
command:
  description: The CLI command run on the target node(s).
  returned: always
  type: str
stderr:
  description: The set of error responses from the vrouter command.
  returned: on error
  type: list
stdout:
  description: The set of responses from the vrouter command.
  returned: always
  type: list