cisco.aci.aci_route_control_context 模块 – 管理路由控制上下文 (rtctrl:CtxP)
注意
此模块是 cisco.aci 集合(版本 2.10.1)的一部分。
如果您正在使用 ansible 包,您可能已经安装了这个集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install cisco.aci。
要在 playbook 中使用它,请指定:cisco.aci.aci_route_control_context。
概要
- 管理 Cisco ACI 交换矩阵上路由控制配置文件的路由控制上下文策略。 
参数
| 参数 | 注释 | 
|---|---|
| 满足条件时所需的操作。 选项 
 | |
| 要与此路由控制上下文关联的操作规则配置文件的名称。 设置路由映射的规则。 | |
| 用户定义的用于注释对象的字符串。 如果在任务中未指定该值,则将使用环境变量  如果在任务和环境变量  默认值:  | |
| 附加到用于基于签名的身份验证的 APIC AAA 用户的 X.509 证书名称。 如果提供了  如果为  如果在任务中未指定该值,则将使用环境变量  | |
| 路由控制上下文的描述。 | |
| 可由 Ansible 控制主机解析的 APIC 的 IP 地址或主机名。 如果在任务中未指定该值,则将使用环境变量  | |
| 现有 L3Out 的名称。 仅当路由控制配置文件链接到现有 L3Out 时才使用。 | |
| 要与此路由控制上下文关联的匹配规则配置文件的名称。 设置关联的匹配规则。 | |
| 当前对象的别名。这与 ACI 中的 nameAlias 字段相关。 | |
| 路由控制上下文的顺序。 取值范围为 0 到 9。 | |
| 影响此 ACI 模块的输出。 
 
 
 如果在任务中未指定该值,则将使用环境变量  选项 
 | |
| 用于转储模块生成的 ACI JSON 配置对象的文件路径。 如果任务中未指定该值,则将使用环境变量  | |
| 用户定义的 ACI 对象的 ownerKey 属性的字符串。 此属性表示一个密钥,用于使客户端能够拥有其数据以进行实体关联。 如果任务中未指定该值,则将使用环境变量  | |
| 用户定义的 ACI 对象的 ownerTag 属性的字符串。 此属性表示一个标签,用于使客户端能够添加自己的数据。 例如,指示谁创建了这个对象。 如果任务中未指定该值,则将使用环境变量  | |
| 用于身份验证的密码。 此选项与  如果任务中未指定该值,则将使用环境变量  | |
| 用于 REST 连接的端口号。 默认值取决于参数  如果任务中未指定该值,则将使用环境变量  | |
| PEM 格式的私钥文件或用于基于签名的身份验证的私钥内容。 此值也会影响所使用的默认  此选项与  如果任务中未指定该值,则将使用环境变量  | |
| 要创建的路由控制上下文的名称。 | |
| 现有路由控制配置文件的名称。 | |
| 使用  使用  选项 
 | |
| 如果为  如果任务中未指定该值,则将使用环境变量  默认值为  警告 - 这会导致先前的返回值为空。 将不会检查对象的先前状态,并且 POST 更新将包含所有属性。 选项 
 | |
| 如果为  如果任务中未指定该值,则将使用环境变量  默认值为  警告 - 这会导致当前的返回值设置为建议的值。 在单个任务中,将无法验证包含默认值的当前对象。 选项 
 | |
| 现有租户的名称。 | |
| 套接字级别的超时时间(以秒为单位)。 如果任务中未指定该值,则将使用环境变量  默认值为 30。 | |
| 如果为  如果任务中未指定该值,则将使用环境变量  默认值为 true。 选项 
 | |
| 如果为  如果任务中未指定该值,则将使用环境变量  当连接为本地连接时,默认值为 true。 选项 
 | |
| 用于身份验证的用户名。 如果任务中未指定该值,则将使用环境变量  默认值为 admin。 | |
| 如果为  只有在使用自签名证书的个人控制站点上时,才应将其设置为  如果任务中未指定该值,则将使用环境变量  默认值为 true。 选项 
 | 
注释
注意
- 使用的 - tenant和- route_control_profile必须在您的 playbook 中使用此模块之前存在。可以使用 cisco.aci.aci_tenant 和 cisco.aci.aci_route_control_profile 模块实现这一点。
- 如果使用 - l3out,则使用的- l3out必须在您的 playbook 中使用此模块之前存在。可以使用 cisco.aci.aci_l3out 模块实现这一点。
- 如果使用 - action_rule,则使用的- action_rule必须在您的 playbook 中使用此模块之前存在。可以使用模块 cisco.aci.aci_tenant_action_rule_profile 实现这一点。
- 如果使用 - match_rule,则使用的- match_rule必须在您的 playbook 中使用此模块之前存在。可以使用模块 cisco.aci.aci_match_rule 实现这一点。
另请参阅
另请参阅
- cisco.aci.aci_tenant
- 管理租户 (fv:Tenant)。 
- cisco.aci.aci_route_control_profile
- 管理路由控制配置文件 (rtctrl:Profile)。 
- cisco.aci.aci_l3out
- 管理第 3 层外部 (L3Out) 对象 (l3ext:Out)。 
- cisco.aci.aci_tenant_action_rule_profile
- 管理操作规则配置文件 (rtctrl:AttrP)。 
- cisco.aci.aci_match_rule
- 管理匹配规则 (rtctrl:SubjP)。 
- APIC 管理信息模型参考
- 有关内部 APIC 类 rtctrl:CtxP 的更多信息。 
- Cisco ACI 指南
- 有关如何使用 Ansible 管理 ACI 基础设施的详细信息。 
- 开发 Cisco ACI 模块
- 有关如何编写自己的 Cisco ACI 模块以做出贡献的详细指南。 
示例
- name: Create a route context policy
  cisco.aci.aci_route_control_context:
    host: apic
    username: admin
    password: SomeSecretPassword
    route_control_context: prod_route_control_context
    route_control_profile: prod_route_control_profile
    tenant: production
    l3out: prod_l3out
    action: permit
    order: 0
    action_rule: prod_action_rule_profile
    match_rule: prod_match_rule
    state: present
  delegate_to: localhost
- name: Delete a route context policy
  cisco.aci.aci_route_control_context:
    host: apic
    username: admin
    password: SomeSecretPassword
    route_control_context: prod_route_control_context
    route_control_profile: prod_route_control_profile
    tenant: production
    l3out: prod_l3out
    state: absent
  delegate_to: localhost
- name: Query all route context policy
  cisco.aci.aci_route_control_context:
    host: apic
    username: admin
    password: SomeSecretPassword
    state: query
  delegate_to: localhost
  register: query_result
- name: Query a specific route context policy
  cisco.aci.aci_route_control_profile:
    host: apic
    username: admin
    password: SomeSecretPassword
    route_control_context: prod_route_control_context
    route_control_profile: prod_route_control_profile
    tenant: production
    l3out: prod_l3out
    state: query
  delegate_to: localhost
  register: query_result
返回值
通用返回值记录在此处,以下是此模块独有的字段
| Key | 描述 | 
|---|---|
| 模块完成后,来自 APIC 的现有配置 返回: success 示例:  | |
| 从 APIC 返回的错误信息 返回: failure 示例:  | |
| 用于请求的过滤器字符串 返回: failure 或 debug 示例:  | |
| 用于向 APIC 发出请求的 HTTP 方法 返回: failure 或 debug 示例:  | |
| 模块启动之前,来自 APIC 的原始配置 返回: info 示例:  | |
| 由用户提供的参数组装的配置 返回: info 示例:  | |
| 由 APIC REST API 返回的原始输出(xml 或 json) 返回: 解析错误 示例:  | |
| 来自 APIC 的 HTTP 响应 返回: failure 或 debug 示例:  | |
| 推送到 APIC 的实际/最小配置 返回: info 示例:  | |
| 来自 APIC 的 HTTP 状态 返回: failure 或 debug 示例:  | |
| 用于向 APIC 发出请求的 HTTP 网址 返回: failure 或 debug 示例:  | 
