dellemc.enterprise_sonic.sonic_bgp_communities module – Manage BGP community and its parameters
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.2.0).
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_communities
.
New in dellemc.enterprise_sonic 1.0.0
Synopsis
This module provides configuration management of BGP bgp_communities for device running Enterprise SONiC Distribution by Dell Technologies.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
---|---|
A list of ‘bgp_communities’ configurations. |
|
Community number aa:nn format 0..65535:0..65535; applicable for standard BGP community type. |
|
Do not send outside local AS (well-known community); applicable for standard BGP community type. Choices:
|
|
Matches any/all of the members. Choices:
|
|
Members of this BGP community list. |
|
Members of this BGP community list. Regular expression string can be given here. Applicable for expanded BGP community type. |
|
Name of the BGP communitylist. |
|
Do not advertise to any peer (well-known community); applicable for standard BGP community type. Choices:
|
|
Do not export to next AS (well-known community); applicable for standard BGP community type. Choices:
|
|
Do not export to next AS (well-known community); applicable for standard BGP community type. Choices:
|
|
Permits or denies this community. Choices:
|
|
Whether it is a standard or expanded community-list entry. 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 community-list
# Standard community list test: match: ANY
# 101
# 201
# Standard community list test1: match: ANY
# 301
- name: Deletes BGP community member
dellemc.enterprise_sonic.sonic_bgp_communities:
config:
- name: test
members:
regex:
- 201
state: deleted
# After state:
# ------------
#
# show bgp community-list
# Standard community list test: match: ANY
# 101
# Standard community list test1: match: ANY
# 301
# Using deleted
# Before state:
# -------------
#
# show bgp community-list
# Standard community list test: match: ANY
# 101
# Expanded community list test1: match: ANY
# 201
- name: Deletes a single BGP community
dellemc.enterprise_sonic.sonic_bgp_communities:
config:
- name: test
members:
state: deleted
# After state:
# ------------
#
# show bgp community-list
# Expanded community list test1: match: ANY
# 201
# Using deleted
# Before state:
# -------------
#
# show bgp community-list
# Standard community list test: match: ANY
# 101
# Expanded community list test1: match: ANY
# 201
- name: Delete All BGP communities
dellemc.enterprise_sonic.sonic_bgp_communities:
config:
state: deleted
# After state:
# ------------
#
# show bgp community-list
#
# Using deleted
# Before state:
# -------------
#
# show bgp community-list
# Standard community list test: match: ANY
# 101
# Expanded community list test1: match: ANY
# 201
- name: Deletes all members in a single BGP community
dellemc.enterprise_sonic.sonic_bgp_communities:
config:
- name: test
members:
regex:
state: deleted
# After state:
# ------------
#
# show bgp community-list
# Expanded community list test: match: ANY
# Expanded community list test1: match: ANY
# 201
# Using merged
# Before state:
# -------------
#
# show bgp as-path-access-list
# AS path list test:
- name: Adds 909.* to test as-path list
dellemc.enterprise_sonic.sonic_bgp_as_paths:
config:
- name: test
members:
- 909.*
state: merged
# After state:
# ------------
#
# show bgp as-path-access-list
# AS path list test:
# members: 909.*
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration model invocation. Returned: when changed Sample: |
|
The configuration prior to the model invocation. Returned: always Sample: |
|
The set of commands that are pushed to the remote device. Returned: always Sample: |