<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>This option is used only with state <em>parsed</em>.</div>
<div>The value of this option should be the output received from the EOS device by executing the command <b>show running-config | section bgp</b>.</div>
<div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
<div>The state the configuration should be left in.</div>
<div>State <em>purged</em> removes all the BGP configurations from the target device. Use caution with this state.('delete protocols bgp <x>')</div>
<div>State <em>deleted</em> only removes BGP attributes that this modules manages and does not negate the BGP process completely. Thereby, preserving address-family related configurations under BGP context.</div>
<div>Running states <em>deleted</em> and <em>replaced</em> will result in an error if there are address-family configuration lines present under neighbor context that is is to be removed. Please use the <span class='module'>vyos.vyos.vyos_bgp_address_family</span> module for prior cleanup.</div>
<div>Refer to examples for more details.</div>
</td>
</tr>
</table>
<br/>
Examples
--------
.. code-block:: yaml
# Using merged
# Before state
# vyos@vyos:~$ show configuration commands | match "set protocols bgp"
# vyos@vyos:~$
- name: Merge provided configuration with device configuration
vyos.vyos.vyos_bgp_global:
config:
as_number: "65536"
aggregate_address:
- prefix: "203.0.113.0/24"
as_set: true
- prefix: "192.0.2.0/24"
summary_only: true
network:
- address: "192.1.13.0/24"
backdoor: true
redistribute:
- protocol: "kernel"
metric: 45
- protocol: "connected"
route_map: "map01"
maximum_paths:
- path: "ebgp"
count: 20
- path: "ibgp"
count: 55
timers:
keepalive: 35
bgp_params:
bestpath:
as_path: "confed"
compare_routerid: true
default:
no_ipv4_unicast: true
router_id: "192.1.2.9"
confederation:
- peers: 20
- peers: 55
- identifier: 66
neighbor:
- address: "192.0.2.25"
disable_connected_check: true
timers:
holdtime: 30
keepalive: 10
- address: "203.0.113.5"
attribute_unchanged:
as_path: true
med: true
ebgp_multihop: 2
remote_as: 101
update_source: "192.0.2.25"
- address: "5001::64"
maximum_prefix: 34
distribute_list:
- acl: 20
action: "export"
- acl: 40
action: "import"
state: merged
# After State
# vyos@vyos:~$ show configuration commands | match "set protocols bgp"
# set protocols bgp system-as 65536
# set protocols bgp aggregate-address 192.0.2.0/24 'summary-only'
# set protocols bgp aggregate-address 203.0.113.0/24 'as-set'
# set protocols bgp maximum-paths ebgp '20'
# set protocols bgp maximum-paths ibgp '55'
# set protocols bgp neighbor 192.0.2.25 'disable-connected-check'
# set protocols bgp neighbor 192.0.2.25 timers holdtime '30'
# set protocols bgp neighbor 192.0.2.25 timers keepalive '10'
# set protocols bgp neighbor 203.0.113.5 attribute-unchanged 'as-path'
# set protocols bgp neighbor 203.0.113.5 attribute-unchanged 'med'
# set protocols bgp neighbor 203.0.113.5 attribute-unchanged 'next-hop'
# set protocols bgp neighbor 203.0.113.5 ebgp-multihop '2'
# set protocols bgp neighbor 203.0.113.5 remote-as '101'
# set protocols bgp neighbor 203.0.113.5 update-source '192.0.2.25'
# set protocols bgp neighbor 5001::64 distribute-list export '20'
# set protocols bgp neighbor 5001::64 distribute-list import '40'
# set protocols bgp neighbor 5001::64 maximum-prefix '34'
# set protocols bgp network 192.1.13.0/24 'backdoor'
# set protocols bgp parameters bestpath as-path 'confed'
# set protocols bgp parameters bestpath 'compare-routerid'
# set protocols bgp parameters confederation identifier '66'
# set protocols bgp parameters confederation peers '20'
# set protocols bgp parameters confederation peers '55'
# set protocols bgp parameters default 'no-ipv4-unicast'
# set protocols bgp parameters router-id '192.1.2.9'
# set protocols bgp redistribute connected route-map 'map01'
# set protocols bgp redistribute kernel metric '45'
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>