ansible.builtin.nxos_bgp_af (v2.3.3.0-1) — module

Manages BGP Address-family configuration.

| "added in version" 2.2 of ansible.builtin"

Authors: Gabriele Gerbino (@GGabriele)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.3.3.0.post1

Description

Manages BGP Address-family configurations on NX-OS switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# configure a simple address-family
- nxos_bgp_af:
    asn: 65535
    vrf: TESTING
    afi: ipv4
    safi: unicast
    advertise_l2vpn_evpn: true
    state: present

Inputs

    
afi:
    choices:
    - ipv4
    - ipv6
    - vpnv4
    - vpnv6
    - l2vpn
    description:
    - Address Family Identifier.
    required: true

asn:
    description:
    - BGP autonomous system number. Valid values are String, Integer in ASPLAIN or ASDOT
      notation.
    required: true

vrf:
    description:
    - Name of the VRF. The name 'default' is a valid VRF representing the global bgp.
    required: true

safi:
    choices:
    - unicast
    - multicast
    - evpn
    description:
    - Sub Address Family Identifier.
    required: true

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Determines whether the config should be present or not on the device.
    required: false

networks:
    default: null
    description:
    - Networks to configure. Valid value is a list of network prefixes to advertise. The
      list must be in the form of an array. Each entry in the array must include a prefix
      address and an optional route-map. For example [['10.0.0.0/16', 'routemap_LA'],
      ['192.168.1.1', 'Chicago'], ['192.168.2.0/24], ['192.168.3.0/24', 'routemap_NYC']].
    required: false

table_map:
    default: null
    description:
    - Apply table-map to filter routes downloaded into URIB. Valid values are a string.
    required: false

inject_map:
    default: null
    description:
    - An array of route-map names which will specify prefixes to inject. Each array entry
      must first specify the inject-map name, secondly an exist-map name, and optionally
      the copy-attributes keyword which indicates that attributes should be copied from
      the aggregate. For example [['lax_inject_map', 'lax_exist_map'], ['nyc_inject_map',
      'nyc_exist_map', 'copy-attributes'], ['fsd_inject_map', 'fsd_exist_map']].
    required: false

redistribute:
    default: null
    description:
    - A list of redistribute directives. Multiple redistribute entries are allowed. The
      list must be in the form of a nested array. the first entry of each array defines
      the source-protocol to redistribute from; the second entry defines a route-map name.
      A route-map is highly advised but may be optional on some platforms, in which case
      it may be omitted from the array list. For example [['direct', 'rm_direct'], ['lisp',
      'rm_lisp']].
    required: false

distance_ebgp:
    default: null
    description:
    - Sets the administrative distance for eBGP routes. Valid values are Integer or keyword
      'default'.
    required: false

distance_ibgp:
    default: null
    description:
    - Sets the administrative distance for iBGP routes. Valid values are Integer or keyword
      'default'.
    required: false

maximum_paths:
    default: null
    description:
    - Configures the maximum number of equal-cost paths for load sharing. Valid value
      is an integer in the range 1-64.

default_metric:
    default: null
    description:
    - Sets default metrics for routes redistributed into BGP. Valid values are Integer
      or keyword 'default'
    required: false

distance_local:
    default: null
    description:
    - Sets the administrative distance for local BGP routes. Valid values are Integer
      or keyword 'default'.
    required: false

dampening_state:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Enable/disable route-flap dampening.
    required: false

client_to_client:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Configure client-to-client route reflection.
    required: false

table_map_filter:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Filters routes rejected by the route-map and does not download them to the RIB.
    required: false

dampen_igp_metric:
    default: null
    description:
    - Specify dampen value for IGP metric-related changes, in seconds. Valid values are
      integer and keyword 'default'.
    required: false

suppress_inactive:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Advertises only active routes to peers.
    required: false

dampening_routemap:
    default: null
    description:
    - Specify route-map for route-flap dampening. Valid values are a string defining the
      name of the route-map.
    required: false

maximum_paths_ibgp:
    default: null
    description:
    - Configures the maximum number of ibgp equal-cost paths for load sharing. Valid value
      is an integer in the range 1-64.
    required: false

next_hop_route_map:
    default: null
    description:
    - Configure a route-map for valid nexthops. Valid values are a string defining the
      name of the route-map.
    required: false

dampening_half_time:
    default: null
    description:
    - Specify decay half-life in minutes for route-flap dampening. Valid values are integer
      and keyword 'default'.
    required: false

advertise_l2vpn_evpn:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Advertise evpn routes.
    required: false

dampening_reuse_time:
    description:
    - Specify route reuse time for route-flap dampening. Valid values are integer and
      keyword 'default'.
    required: false

additional_paths_send:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Enables the send capability of additional paths for all of the neighbors under this
      address family for which the capability has not been disabled.
    required: false

dampening_suppress_time:
    default: null
    description:
    - Specify route suppress time for route-flap dampening. Valid values are integer and
      keyword 'default'.
    required: false

additional_paths_install:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Install a backup path into the forwarding table and provide prefix independent convergence
      (PIC) in case of a PE-CE link failure.
    required: false

additional_paths_receive:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Enables the receive capability of additional paths for all of the neighbors under
      this address family for which the capability has not been disabled.
    required: false

additional_paths_selection:
    default: null
    description:
    - Configures the capability of selecting additional paths for a prefix. Valid values
      are a string defining the name of the route-map.
    required: false

dampening_max_suppress_time:
    default: null
    description:
    - Specify max suppress time for route-flap dampening stable route. Valid values are
      integer and keyword 'default'.
    required: false

default_information_originate:
    choices:
    - 'true'
    - 'false'
    default: null
    description:
    - Default information originate.
    required: false

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: boolean
end_state:
  description: k/v pairs of BGP AF configuration after module execution
  returned: verbose mode
  sample:
    additional_paths_install: false
    additional_paths_receive: false
    additional_paths_selection: ''
    additional_paths_send: false
    advertise_l2vpn_evpn: true
    afi: ipv4
    asn: '65535'
    client_to_client: true
    dampen_igp_metric: '600'
    dampening_half_time: ''
    dampening_max_suppress_time: ''
    dampening_reuse_time: ''
    dampening_routemap: ''
    dampening_state: false
    dampening_suppress_time: ''
    default_information_originate: false
    default_metric: ''
    distance_ebgp: '20'
    distance_ibgp: '200'
    distance_local: '220'
    inject_map: []
    maximum_paths: '1'
    maximum_paths_ibgp: '1'
    networks: []
    next_hop_route_map: ''
    redistribute: []
    safi: unicast
    suppress_inactive: false
    table_map: ''
    table_map_filter: false
    vrf: TESTING
  type: dict
existing:
  description: k/v pairs of existing BGP AF configuration
  returned: verbose mode
  sample: {}
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: verbose mode
  sample:
    advertise_l2vpn_evpn: true
    afi: ipv4
    asn: '65535'
    safi: unicast
    vrf: TESTING
  type: dict
updates:
  description: commands sent to the device
  returned: always
  sample:
  - router bgp 65535
  - vrf TESTING
  - address-family ipv4 unicast
  - advertise l2vpn evpn
  type: list