ACI mso_schema_template_bd help needed

Hello all,

I hope someone can assist here.

Trying to use the mso_schema_template_bd module to develop some scripts for a customer but I am getting am struggling to understand what is required to add a subnets as a ‘list’ in the module. There is no example, like the vrf ‘dict’.
It might be something blatantly obvious I am doing wrong, but i can’t see what it is.

What should the subnets YAML code look like for me to achieve a result?

  • name: Add a new BD
    mso_schema_template_bd:

host: “{{ ansible_host }}”

username: admin

password: *****

host: “{{ ansible_host }}”
username: “{{ ansible_user1 }}”
password: “{{ ansible_password1 }}”
validate_certs: false

Module specific variables

schema: sch-{{tenant_name}}-legacy
template: tmpl-{{tenant_name}}-{{site}}{{site_id}}-legacy
bd: bd-{{site}}{{site_id}}-{{item}}
subnets: [description, “11.11.12.1/24”, no, public, no]
vrf:
name: VRF1
state: present
with_items:

  • “{{ entry[site_id][‘vlan_id’] }}”
    delegate_to: localhost

Any assistance would be appreciated.

Albert Short

As I read the documentation it's a list with dicts

  subnets:
    - description: Some text
      ip: 11.11.12.1/24
      no_default_gateway: no
      scope: public
      shared: no

or in one line and harder to read

  subnets: [{"description": "Some text", "ip": "11.11.12.1/24", "no_default_gateway": no, "scope": "public", "shared": no}]

Kai,

you are a life saver. that worked.

Many thanks for that prompt reply.

Albert