cisco.aci.aci_l3out_bgp_peer 模块 – 管理三层外部 (L3Out) BGP 对等体 (bgp:PeerP 和 bgp:InfraPeerP)
注意
此模块是 cisco.aci 集合 (版本 2.10.1) 的一部分。
如果您正在使用 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install cisco.aci
。
要在 playbook 中使用它,请指定: cisco.aci.aci_l3out_bgp_peer
。
概要
管理 Cisco ACI 结构上的 L3Out BGP 对等体。
参数
参数 |
注释 |
---|---|
地址类型控制 选项
|
|
BGP 会话的管理状态 选项
|
|
允许的自 AS 数量。 仅当 |
|
用于注释对象的自定义字符串。 如果任务中未指定值,则将使用环境变量 如果任务中未指定值且未设置环境变量 默认值: |
|
BGP 控制 选项
|
|
BGP Infra 对等体 (bgp:InfraPeerP)。 选项
|
|
BGP 对等体的密码。 提供密码将始终导致更改,因为设置的密码无法从 APIC 中检索。 |
|
BGP 对等体前缀策略。 仅当 *bgp_infra_peer=true* 时才允许配置 BGP 对等体前缀策略。 |
|
附加到用于基于签名的身份验证的 APIC AAA 用户的 X.509 证书名称。 如果提供了 如果为 如果任务中未指定值,则将使用环境变量 |
|
BGP 对等体的描述。 |
|
Ansible 控制主机可解析的 APIC 的 IP 地址或主机名。 如果任务中未指定值,则将使用环境变量 |
|
接口配置文件的名称。 |
|
现有 L3Out 的名称。 |
|
L3Out BGP 对等体的本地自治系统编号 (ASN)。 在创建期间未设置时,APIC 默认为 0。 |
|
L3Out BGP 对等体的本地自治系统编号 (ASN) 配置。 在创建期间未设置时,APIC 默认为 选项
|
|
用于在端口通道和单端口上构建接口的节点。 用于 vPC 的节点的带连字符分隔的对 (例如,“201-202”)。 |
|
节点配置文件的名称。 |
|
影响此 ACI 模块的输出。
如果任务中未指定值,则将改用环境变量 选项
|
|
模块生成的ACI JSON配置对象的转储文件路径。 如果任务中未指定值,则将改用环境变量 |
|
用于身份验证的密码。 此选项与 如果任务中未指定值,则将改用环境变量 |
|
接口路径 端口通道和vPC的接口端口组名称 单个端口的端口号(例如,“eth1/12”) |
|
对等体控制 选项
|
|
BGP对等体的IP地址。 |
|
BGP对等体类型。 选项
|
|
在其上构建接口的Pod。 |
|
用于REST连接的端口号。 默认值取决于参数 如果任务中未指定值,则将改用环境变量 |
|
私有AS控制 选项
|
|
PEM格式的私钥文件或用于基于签名的身份验证的私钥内容。 此值还会影响使用的默认 此选项与 如果任务中未指定值,则将改用环境变量 |
|
BGP对等体的自治系统编号。 |
|
字典对象的列表,用于将BGP对等体连接配置文件绑定到路由控制配置文件。 |
|
路由控制配置文件方向的名称。 |
|
L3 Out的名称。 |
|
路由控制配置文件的名称。 |
|
租户的名称。 |
|
使用 使用 选项
|
|
如果为 如果任务中未指定值,则将改用环境变量 默认值为 警告 - 这会导致先前的返回值为空。 不会检查对象的先前状态,并且POST更新将包含所有属性。 选项
|
|
如果为 如果任务中未指定值,则将改用环境变量 默认值为 警告 - 这会导致当前返回值设置为建议值。 包含默认值的当前对象在一个任务中将无法验证。 选项
|
|
现有租户的名称。 |
|
以秒为单位的套接字级别超时。 如果任务中未指定值,则将改用环境变量 默认值为30。 |
|
传输数据平面类型。 选项
|
|
eBGP多跳生存时间 |
|
如果为 如果任务中未指定值,则将改用环境变量 默认值为true。 选项
|
|
如果为 如果任务中未指定值,则将改用环境变量 连接为本地连接时,默认值为true。 选项
|
|
用于身份验证的用户名。 如果任务中未指定值,则将改用环境变量 默认值为admin。 |
|
如果为 只有在使用自签名证书的个人控制站点上时,才应将其设置为 如果任务中未指定值,则将改用环境变量 默认值为true。 选项
|
|
来自此邻居的BGP路由的权重 |
另请参见
另请参见
- aci_l3out
有关aci_l3out模块的官方文档。
- aci_l3out_logical_node_profile
有关aci_l3out_logical_node_profile模块的官方文档。
- APIC管理信息模型参考
有关内部APIC类bgp:peerP和bgp:InfraPeerP的更多信息
- Cisco ACI指南
使用Ansible管理ACI基础设施的详细信息。
- 开发Cisco ACI模块
有关如何编写自己的Cisco ACI模块以进行贡献的详细指南。
示例
- name: Add a new BGP peer on a physical interface
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
tenant: my_tenant
l3out: my_l3out
node_profile: my_node_profile
interface_profile: my_interface_profile
pod_id: 1
node_id: 201
path_ep: eth1/12
peer_ip: 192.168.10.2
remote_asn: 65456
bgp_controls:
- nh-self
- send-com
- send-ext-com
peer_controls:
- bfd
route_control_profiles:
- tenant: "ansible_tenant"
profile: "anstest_import"
direction: "import"
- tenant: "ansible_tenant"
profile: "anstest_export"
direction: "export"
l3out: "anstest_l3out"
state: present
delegate_to: localhost
- name: Add a new BGP peer on a vPC
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
tenant: my_tenant
l3out: my_l3out
node_profile: my_node_profile
interface_profile: my_interface_profile
pod_id: 1
node_id: 201-202
path_ep: my_vpc_ipg
peer_ip: 192.168.20.2
remote_asn: 65457
ttl: 4
weight: 50
state: present
delegate_to: localhost
- name: Create Infra BGP Peer with password
aci_l3out_bgp_peer: &infra_bgp_peer
host: apic
username: admin
password: SomeSecretPassword
tenant: infra
l3out: ansible_infra_l3out
node_profile: ansible_infra_l3out_node_profile
ttl: 2
bgp_infra_peer: true
bgp_password: ansible_test_password
peer_ip: 192.168.50.2
remote_asn: 65450
local_as_number: 65460
peer_type: sr_mpls
bgp_controls:
- send-domain-path
transport_data_plane: sr_mpls
bgp_peer_prefix_policy: ansible_peer_prefix_profile
state: present
delegate_to: localhost
- name: Shutdown a BGP peer
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
tenant: my_tenant
l3out: my_l3out
node_profile: my_node_profile
interface_profile: my_interface_profile
pod_id: 1
node_id: 201
path_ep: eth1/12
peer_ip: 192.168.10.2
admin_state: disabled
state: present
delegate_to: localhost
- name: Delete a BGP peer
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
tenant: my_tenant
l3out: my_l3out
node_profile: my_node_profile
interface_profile: my_interface_profile
pod_id: 1
node_id: 201
path_ep: eth1/12
peer_ip: 192.168.10.2
state: absent
delegate_to: localhost
- name: Add BGP Peer to the Node Profile level
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
tenant: ansible_tenant
l3out: ansible_l3out
node_profile: ansible_node_profile
peer_ip: 192.168.50.3
route_control_profiles:
- tenant: "ansible_tenant"
profile: "anstest_import"
direction: "import"
- tenant: "ansible_tenant"
profile: "anstest_export"
direction: "export"
l3out: "anstest_l3out"
state: present
delegate_to: localhost
- name: Query a BGP peer
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
tenant: my_tenant
l3out: my_l3out
node_profile: my_node_profile
interface_profile: my_interface_profile
pod_id: 1
node_id: 201
path_ep: eth1/12
peer_ip: 192.168.10.2
state: query
delegate_to: localhost
register: query_result
- name: Query all BGP peer
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
state: query
delegate_to: localhost
register: query_all
- name: Query all BGP infra peer
cisco.aci.aci_l3out_bgp_peer:
host: apic
username: admin
password: SomeSecretPassword
bgp_infra_peer: true
state: query
delegate_to: localhost
register: query_all
返回值
常用返回值已在此处记录,以下是此模块特有的字段
键 |
描述 |
---|---|
模块完成后的APIC现有配置 返回:成功 示例: |
|
APIC返回的错误信息 返回:失败 示例: |
|
用于请求的过滤器字符串 返回:失败或调试 示例: |
|
用于向APIC发出请求的HTTP方法 返回:失败或调试 示例: |
|
模块启动前APIC的原始配置 返回:信息 示例: |
|
根据用户提供的参数组装的配置 返回:信息 示例: |
|
APIC REST API 返回的原始输出 (XML 或 JSON) 返回: 解析错误 示例: |
|
APIC 的 HTTP 响应 返回:失败或调试 示例: |
|
实际/最小配置已推送到 APIC 返回:信息 示例: |
|
APIC 的 HTTP 状态 返回:失败或调试 示例: |
|
用于向 APIC 发出请求的 HTTP URL 返回:失败或调试 示例: |