cisco.mso.mso_schema_site_anp_epg_domain 模块 – 在模式模板中管理站点本地 EPG 域

注意

此模块是 cisco.mso 集合(版本 2.9.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install cisco.mso。您需要进一步的要求才能使用此模块,有关详细信息,请参阅要求

要在剧本中使用它,请指定:cisco.mso.mso_schema_site_anp_epg_domain

概要

  • 在 Cisco ACI Multi-Site 上管理模式模板中的站点本地 EPG 域。

要求

执行此模块的主机需要满足以下要求。

  • Multi Site Orchestrator v2.1 或更新版本

参数

参数

注释

allow_micro_segmentation

布尔值

指定是否启用微隔离。此属性只能与 VMM 域关联一起使用。

选项

  • false

  • true

allow_promiscuous

字符串

域关联的允许混杂状态。此属性只能与 VMM 域关联一起使用。

选项

  • "accept"

  • "reject" ← (默认)

anp

字符串 / 必需

ANP 的名称。

binding_type

字符串

要与此域关联使用的 binding_type。此属性只能与 VMM 域关联一起使用。

选项

  • "static"

  • "dynamic"

  • "none" ← (默认)

  • "ephemeral"

custom_epg_name

字符串

要与此域关联使用的 custom_epg_name。此属性只能与 VMM 域关联一起使用。

delimiter

字符串

要与此域关联使用的 delimiter。此属性只能与 VMM 域关联一起使用。

选项

  • "+"

  • "|"

  • "~"

  • "!"

  • "@"

  • "^"

  • "="

deployment_immediacy

字符串

域的部署立即性。

immediate 表示 立即部署

lazy 表示 按需部署

选项

  • "immediate"

  • "lazy"

domain_association_type

字符串

要关联的域的类型。

选项

  • "vmmDomain"

  • "l3ExtDomain"

  • "l2ExtDomain"

  • "physicalDomain"

  • "fibreChannelDomain"

domain_profile

字符串

域配置文件名称。

enhanced_lagpolicy_dn

字符串

EPG lagpolicy 的可分辨名称。此属性只能与 VMM 域关联一起使用。

enhanced_lagpolicy_name

字符串

EPG 增强型 lagpolicy 名称。此属性只能与 VMM 域关联一起使用。

epg

字符串 / 必需

EPG 的名称。

forged_transmits

字符串

域关联的伪造传输状态。此属性只能与 VMM 域关联一起使用。

选项

  • "accept"

  • "reject" ← (默认)

host

别名:hostname

字符串

ACI Multi Site Orchestrator 主机的 IP 地址或主机名。

如果未在任务中指定该值,则将改用环境变量 MSO_HOST 的值。

login_domain

字符串

用于身份验证的登录域名。

默认值为 Local。

如果未在任务中指定该值,则将改用环境变量 MSO_LOGIN_DOMAIN 的值。

当使用 HTTPAPI 连接插件时,如果未指定此属性,则将使用清单变量 ansible_httpapi_login_domain

mac_changes

字符串

域关联的 MAC 更改状态。此属性只能与 VMM 域关联一起使用。

选项

  • "accept"

  • "reject" ← (默认)

micro_seg_vlan

整数

用于微隔离的虚拟 LAN。此属性只能与 VMM 域关联一起使用。

micro_seg_vlan_type

字符串

用于微隔离的虚拟 LAN 类型。此属性只能与 VMM 域关联一起使用。

选项

  • "vlan"

netflow_pref

字符串

域关联的 netflow 首选项状态。此属性只能与 VMM 域关联一起使用。

选项

  • "enabled"

  • "disabled" ← (默认)

num_ports

整数

绑定类型的端口数。此属性只能与 VMM 域关联一起使用。

output_level

字符串

影响此 MSO 模块的输出。

normal 表示标准输出,包括 current 字典

info 添加信息输出,包括 previousproposedsent 字典

debug 添加调试输出,包括 filter_stringmethodresponsestatusurl 信息

如果任务中未指定该值,则将改为使用环境变量 MSO_OUTPUT_LEVEL 的值。

选项

  • "debug"

  • "info"

  • "normal" ← (默认)

password

字符串

用于身份验证的密码。

如果任务中未指定该值,则将改为使用环境变量 MSO_PASSWORDANSIBLE_NET_PASSWORD 的值。

port

整数

用于 REST 连接的端口号。

默认值取决于参数 `use_ssl`。

如果任务中未指定该值,则将改为使用环境变量 MSO_PORT 的值。

port_allocation

字符串

绑定类型的端口分配。此属性只能与 VMM 域关联和静态绑定类型一起使用。

binding_type=static 时是必需的。

选项

  • "elastic"

  • "fixed"

port_encap_vlan

整数

端口封装的虚拟 LAN 类型。此属性只能与 VMM 域关联一起使用。

port_encap_vlan_type

字符串

端口封装的虚拟 LAN 类型。此属性只能与 VMM 域关联一起使用。

选项

  • "vlan"

resolution_immediacy

字符串

确定何时解析策略并使其可用。

创建时未设置,则默认为 lazy

选项

  • "immediate"

  • "lazy"

  • "pre-provision"

schema

字符串 / 必需

模式的名称。

site

字符串 / 必需

站点的名称。

state

字符串

使用 presentabsent 来添加或删除。

使用 query 来列出单个或多个对象。

选项

  • "absent"

  • "present" ← (默认)

  • "query"

switch_type

字符串

与此域关联一起使用的交换机类型。此属性只能与 VMM 域关联一起使用。

switching_mode

字符串

与此域关联一起使用的交换模式。此属性只能与 VMM 域关联一起使用。

template

字符串 / 必需

模板的名称。

timeout

整数

套接字级别的超时时间(以秒为单位)。

默认值为 30 秒。

如果任务中未指定该值,则将改为使用环境变量 MSO_TIMEOUT 的值。

use_proxy

布尔值

如果为 false,则即使在目标主机上的环境变量中定义了代理,也不会使用代理。

如果任务中未指定该值,则将改为使用环境变量 MSO_USE_PROXY 的值。

默认为 true

选项

  • false

  • true

use_ssl

布尔值

如果为 false,则将使用 HTTP 连接而不是默认的 HTTPS 连接。

如果任务中未指定该值,则将改为使用环境变量 MSO_USE_SSL 的值。

当使用 HTTPAPI 连接插件时,如果未指定此属性,则将使用清单变量 ansible_httpapi_use_ssl

当使用 HTTPAPI 连接插件(mso 或 nd)时,默认为 false,当使用旧的连接方法(仅适用于 mso)时,默认为 true

选项

  • false

  • true

username

字符串

用于身份验证的用户名。

如果任务中未指定该值,则将改为使用环境变量 MSO_USERNAMEANSIBLE_NET_USERNAME 的值。

validate_certs

布尔值

如果为 false,则不会验证 SSL 证书。

只有在使用自签名证书的个人控制站点上时,才应将其设置为 false

如果任务中未指定该值,则将改为使用环境变量 MSO_VALIDATE_CERTS 的值。

默认为 true

选项

  • false

  • true

vlan_encap_mode

字符串

要使用的 VLAN 封装模式。此属性只能与 VMM 域关联一起使用。

选项

  • "static"

  • "dynamic"

注释

注意

  • ACI MultiSite PATCH API 存在一个缺陷,要求某些对象通过索引引用。当在并发访问时更改/删除对象时,这可能会导致静默损坏,因为可能会引用错误的对象。此模块会受到此缺陷的影响。

  • 此模块编写用于支持 Multi Site Orchestrator v2.1 或更高版本。某些或全部功能可能无法在早期版本上运行。

另请参阅

另请参阅

cisco.mso.mso_schema_site_anp_epg

管理模式模板中的站点本地端点组(EPG)。

cisco.mso.mso_schema_template_anp_epg

管理模式模板中的端点组(EPG)。

示例

- name: Add a new domain to a site EPG
  cisco.mso.mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    domain_association_type: vmmDomain
    domain_profile: 'VMware-VMM'
    deployment_immediacy: lazy
    resolution_immediacy: pre-provision
    state: present

- name: Add a new domain to a site EPG with all possible attributes set
  cisco.mso.mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    domain_association_type: vmmDomain
    domain_profile: 'VMware-VMM'
    deployment_immediacy: immediate
    resolution_immediacy: immediate
    micro_seg_vlan_type: vlan
    micro_seg_vlan: 100
    port_encap_vlan_type: vlan
    port_encap_vlan: 100
    vlan_encap_mode: static
    allow_micro_segmentation: true
    switch_type: default
    switching_mode: native
    enhanced_lagpolicy_name: ansible_lag_name
    enhanced_lagpolicy_dn: ansible_lag_dn
    delimiter: '|'
    binding_type: static
    num_ports: 2
    port_allocation: elastic
    netflow_pref: enabled
    allow_promiscuous: accept
    forged_transmits: accept
    mac_changes: accept
    custom_epg_name: ansible_custom_epg
    state: present

- name: Query a domain associated with a specific site EPG
  cisco.mso.mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    domain_association_type: vmmDomain
    domain_profile: 'VMware-VMM'
    state: query
  register: query_result

- name: Query all domains associated with a site EPG
  cisco.mso.mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    state: query
  register: query_result

- name: Remove a domain from a site EPG
  cisco.mso.mso_schema_site_anp_epg_domain:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    schema: Schema1
    site: Site1
    template: Template1
    anp: ANP1
    epg: EPG1
    domain_association_type: vmmDomain
    domain_profile: 'VMware-VMM'
    deployment_immediacy: lazy
    resolution_immediacy: pre-provision
    state: absent

作者

  • Nirav Katarmal (@nkatarmal-crest)

  • Mabille Florent (@fmabille09)

  • Akini Ross (@akinross)