Note
This plugin is part of the dellemc.enterprise_sonic collection (version 1.1.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 version 1.0.0: of dellemc.enterprise_sonic
Note
This module has a corresponding action plugin.
Parameter | Choices/Defaults | Comments | ||
---|---|---|---|---|
config list / elements=dictionary | A list of 'bgp_communities' configurations. | |||
aann string | Community number aa:nn format 0..65535:0..65535; applicable for standard BGP community type. | |||
local_as boolean |
| Do not send outside local AS (well-known community); applicable for standard BGP community type. | ||
match string |
| Matches any/all of the members. | ||
members dictionary | Members of this BGP community list. | |||
regex list / elements=string | Members of this BGP community list. Regular expression string can be given here. Applicable for expanded BGP community type. | |||
name string / required | Name of the BGP communitylist. | |||
no_advertise boolean |
| Do not advertise to any peer (well-known community); applicable for standard BGP community type. | ||
no_export boolean |
| Do not export to next AS (well-known community); applicable for standard BGP community type. | ||
no_peer boolean |
| Do not export to next AS (well-known community); applicable for standard BGP community type. | ||
permit boolean |
| Permits or denies this community. | ||
type string |
| Whether it is a standard or expanded community-list entry. | ||
state string |
| The state of the configuration after module completion. |
Note
check_mode
.# 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.*
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
after list / elements=string | when changed | The resulting configuration model invocation. Sample: The configuration that is returned is always in the same format of the parameters above. |
before list / elements=string | always | The configuration prior to the model invocation. Sample: The configuration that is returned is always in the same format of the parameters above. |
commands list / elements=string | always | The set of commands that are pushed to the remote device. Sample: ['command 1', 'command 2', 'command 3'] |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_bgp_communities_module.html