Note
This module is part of the cisco.mso collection (version 2.11.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 cisco.mso. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: cisco.mso.ndo_l3out_bgp_peer.
New in cisco.mso 2.11.0
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
address_families dictionary | The address family controls for the BGP peer. |
|
multicast boolean |
The multicast address flag of the address family. Choices:
|
|
state string |
Use Use Choices:
|
|
unicast boolean |
The unicast address flag of the address family. Choices:
|
admin_state string | The administrative state of the L3Out BGP Peer. Defaults to Choices:
|
allowed_self_as_count integer | The allowed self-AS count of the L3Out BGP Peer. Defaults to 3 when unset during creation. The value must be between 1 and 10. |
auth_password string | The authentication password of the L3Out BGP Peer. |
bgp_controls dictionary | The BGP control settings for the peer. |
|
allow_self_as boolean |
The allow self AS flag of the BGP control. Choices:
|
|
disabled_peer_as_check boolean |
The disable peer AS check flag of the BGP control. Choices:
|
|
next_hop_self boolean |
The set next hop to self flag of the BGP control. Choices:
|
|
override_as boolean |
The override AS flag of the BGP control. Choices:
|
|
send_community boolean |
The send community flag of the BGP control. Choices:
|
|
send_domain_path boolean |
The send domain path flag of the BGP control. Choices:
|
|
send_extended_community boolean |
The send extended community flag of the BGP control. Choices:
|
|
state string |
Use Use Choices:
|
ebgp_multi_hop_ttl integer | The TTL for eBGP multi-hop of the L3Out BGP Peer. Defaults to 1 when unset during creation. The value must be between 1 and 255. |
export_route_map dictionary | The name of the export route map. Providing an empty dictionary will remove the This parameter can be used instead of |
|
name string |
The name of the export route map. |
|
template string |
The template associated with the export route map. This parameter or |
|
template_id string |
The template ID associated with the the export route map. This parameter or |
export_route_map_uuid string | The UUID of the export route map. Providing an empty string will remove the This parameter can be used instead of |
host aliases: hostname string | IP Address or hostname of the ACI Multi Site Orchestrator host. If the value is not specified in the task, the value of environment variable |
import_route_map dictionary | The name of the import route map. Providing an empty dictionary will remove the This parameter can be used instead of |
|
name string |
The name of the import route map. |
|
template string |
The template associated with the import route map. This parameter or |
|
template_id string |
The template ID associated with the the import route map. This parameter or |
import_route_map_uuid string | The UUID of the import route map. Providing an empty string will remove the This parameter can be used instead of |
ipv4_address aliases: peer_address_ipv4 string | The IPv4 address of the L3Out BGP Peer. Providing an empty string will remove the |
ipv6_address aliases: peer_address_ipv6 string | The IPv6 address of the L3Out BGP Peer. Providing an empty string will remove the |
l3out string | The name of the L3Out. This parameter or |
l3out_uuid string | The UUID of the L3Out. This parameter or |
local_asn string | The local autonomous system number (ASN) of the L3Out BGP Peer. The value must be between 1 and 4294967295. Providing an empty string will remove the |
local_asn_config string | The configuration for local ASN of the L3Out BGP Peer. Choices:
|
login_domain string | The login domain name to use for authentication. The default value is Local. If the value is not specified in the task, the value of environment variable When using a HTTPAPI connection plugin the inventory variable |
node_group string / required | The name of the Node Group Policy. |
output_level string | Influence the output of this MSO module.
If the value is not specified in the task, the value of environment variable Choices:
|
password string | The password to use for authentication. If the value is not specified in the task, the value of environment variables |
peer_controls dictionary | The Peer control settings for the BGP peer. |
|
bfd boolean |
The Enable Bidirectional Forwarding Detection (BFD) flag of the Peer control. Choices:
|
|
disable_peer_connected_check boolean |
The disable peer connected check flag of the Peer control. Choices:
|
|
state string |
Use Use Choices:
|
peer_prefix dictionary | The name of the peer prefix. Providing an empty dictionary will remove the This parameter can be used instead of |
|
name string |
The name of the peer prefix. |
|
template string |
The template associated with the peer prefix. This parameter or |
|
template_id string |
The template ID associated with the the peer prefix. This parameter or |
peer_prefix_uuid string | The UUID of the peer prefix. Providing an empty string will remove the This parameter can be used instead of |
port integer | Port number to be used for the REST connection. The default value depends on parameter `use_ssl`. If the value is not specified in the task, the value of environment variable |
private_as_controls dictionary | The private AS control settings for the BGP peer. |
|
remove_all boolean |
The remove all flag of the private AS numbers. Choices:
|
|
replace_with_local_as boolean |
The replace private AS with local AS flag of the private AS control. Choices:
|
|
state string |
Use Use Choices:
|
remote_asn string | The remote autonomous system number (ASN) of the L3Out BGP Peer. The value must be between 1 and 4294967295. Providing an empty string will remove the |
site_of_origin aliases: fabric_of_origin string | The site of origin for the L3Out BGP Peer. The value must adhere to the pattern “extended:as2-nn2:1000:65534”. |
state string | Use Use Use Choices:
|
template aliases: l3out_template string | The name of the L3Out template. This parameter or |
template_id aliases: l3out_template_id string | The ID of the L3Out template. This parameter or |
timeout integer | The socket level timeout in seconds. The default value is 30 seconds. If the value is not specified in the task, the value of environment variable |
use_proxy boolean | If If the value is not specified in the task, the value of environment variable The default is Choices:
|
use_ssl boolean | If If the value is not specified in the task, the value of environment variable When using a HTTPAPI connection plugin the inventory variable The default is Choices:
|
username string | The username to use for authentication. If the value is not specified in the task, the value of environment variables |
validate_certs boolean | If This should only set to If the value is not specified in the task, the value of environment variable The default is Choices:
|
weight string | The weight of the L3Out BGP Peer. The value must be between 1 and 65535. Providing an empty string will remove the |
Note
template must exist before using this module in your playbook. Use cisco.mso.ndo_template to create the L3Out template.l3out must exist before using this module in your playbook. Use cisco.mso.ndo_l3out_template to create the L3Out.node_group must exist before using this module in your playbook. Use cisco.mso.ndo_l3out_node_group_policy to create the L3Out Node Group Policy.peer_prefix must exist before using it with this module in your playbook. Use cisco.mso.ndo_tenant_bgp_peer_prefix_policy to create the BGP Peer Prefix Policy.See also
Manage Templates on Cisco Nexus Dashboard Orchestrator (NDO).
Manage L3Outs on Cisco Nexus Dashboard Orchestrator (NDO).
Manage L3Out Node Group Policy on Cisco Nexus Dashboard Orchestrator (NDO).
Manage BGP Peer Prefix Policies in Tenant Policy Templates on Cisco Nexus Dashboard Orchestrator (NDO).
- name: Create an L3Out BGP Peer with minimum configuration
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv4_address: "1.1.1.1"
ipv6_address: "1::8/16"
auth_password: 123
state: present
- name: Update an L3Out BGP Peer with full configuration
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv4_address: "1.1.1.1"
ipv6_address: "1::8/16"
remote_asn: 2
admin_state: enabled
import_route_map:
name: ans_route_map
template: ansible_test_policy
export_route_map:
name: ans_route_map_2
template: ansible_test_policy
peer_prefix:
name: ansible_test_bgp_peer_prefix_policy
template: ansible_test_policy
ebgp_multi_hop_ttl: 1
auth_password: 123
weight: 2
site_of_origin: "extended:as2-nn2:1000:65534"
allowed_self_as_count: 3
local_asn_config: replace_as
local_asn: 1
bgp_controls:
allow_self_as: true
override_as: true
disabled_peer_as_check: true
next_hop_self: true
send_community: true
send_extended_community: true
send_domain_path: true
peer_controls:
bfd: true
disable_peer_connected_check: true
address_families:
multicast: true
unicast: true
private_as_controls:
remove_all: true
replace_with_local_as: true
state: present
- name: Query an L3Out BGP Peer with IPv4 and IPv6 addresses
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv4_address: "1.1.1.1"
ipv6_address: "1::8/16"
state: query
register: query_with_ipv4_and_ipv6
- name: Query an L3Out BGP Peer with IPv4
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv4_address: "1.1.1.1"
state: query
register: query_with_ipv4
- name: Query an L3Out BGP Peer with IPv6
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv6_address: "1::8/16"
state: query
register: query_with_ipv6
- name: Query all L3Out BGP Peer
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
state: query
register: query_all
- name: Remove an L3Out BGP Peer with IPv4 and IPv6 addresses
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv4_address: "1.1.1.1"
ipv6_address: "1::8/16"
state: absent
- name: Remove an L3Out BGP Peer with IPv4
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv4_address: "1.1.1.1"
state: absent
- name: Remove an L3Out BGP Peer with IPv6
cisco.mso.ndo_l3out_bgp_peer:
host: mso_host
username: admin
password: SomeSecretPassword
template: l3out_template
l3out: l3out_1
node_group: node_group_policy_1
ipv6_address: "1::8/16"
state: absent
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/mso/ndo_l3out_bgp_peer_module.html