dellemc.enterprise_sonic.sonic_bgp_as_paths module – Manage BGP autonomous system path (or as-path-list) and its parameters
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.5.1).
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 dellemc.enterprise_sonic
.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_bgp_as_paths
.
New in dellemc.enterprise_sonic 1.0.0
Synopsis
This module provides configuration management of BGP bgp_as_paths for devices running Enterprise SONiC Distribution by Dell Technologies.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
A list of ‘bgp_as_paths’ configurations. |
|
Members of this BGP as-path; regular expression string can be provided. |
|
Name of as-path-list. |
|
Permits or denies this as-path. Default value while adding a new as-path-list is Choices:
|
|
The state of the configuration after module completion. Choices:
|
Notes
Note
Tested against Enterprise SONiC Distribution by Dell Technologies.
Supports
check_mode
.
Examples
# Using deleted
# Before state:
# -------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 808.*,909.*
- name: Delete BGP as path list
dellemc.enterprise_sonic.sonic_bgp_as_paths:
config:
- name: test
members:
- 909.*
permit: true
state: deleted
# After state:
# ------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 808.*
# Using deleted
# Before state:
# -------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 808.*,909.*
# AS path list test1:
# action: deny
# members: 608.*,709.*
- name: Deletes BGP as-path list
dellemc.enterprise_sonic.sonic_bgp_as_paths:
config:
- name: test
members:
state: deleted
# After state:
# ------------
#
# show bgp as-path-access-list
# AS path list test1:
# action: deny
# members: 608.*,709.*
# Using deleted
# Before state:
# -------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 808.*,909.*
- name: Deletes BGP as-path list
dellemc.enterprise_sonic.sonic_bgp_as_paths:
config:
state: deleted
# After state:
# ------------
#
# show bgp as-path-access-list
# (No bgp as-path-access-list configuration present)
# Using merged
# Before state:
# -------------
#
# show bgp as-path-access-list
# (No bgp as-path-access-list configuration present)
- name: Create a BGP as-path list
dellemc.enterprise_sonic.sonic_bgp_as_paths:
config:
- name: test
members:
- 909.*
permit: true
state: merged
# After state:
# ------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 909.*
# Using replaced
# Before state:
# -------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 800.*,808.*
# AS path list test1:
# action: deny
# members: 500.*
- name: Replace device configuration of specified BGP as-path lists with provided configuration
dellemc.enterprise_sonic.sonic_bgp_as_paths:
config:
- name: test
members:
- 900.*
- 901.*
permit: true
- name: test1
- name: test2
members:
- 100.*
permit: true
state: replaced
# After state:
# ------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 900.*,901.*
# AS path list test2:
# action: permit
# members: 100.*
# Using overridden
# Before state:
# -------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 800.*,808.*
# AS path list test1:
# action: deny
# members: 500.*
- name: Override device configuration of all BGP as-path lists with provided configuration
dellemc.enterprise_sonic.sonic_bgp_as_paths:
config:
- name: test
members:
- 900.*
- 901.*
permit: true
state: overridden
# After state:
# ------------
#
# show bgp as-path-access-list
# AS path list test:
# action: permit
# members: 900.*,901.*
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration module invocation. Returned: when changed Sample: |
|
The configuration prior to the module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |