# ACI mso\_schema\_template\_bd help needed

**URL:** <https://forum.ansible.com/t/aci-mso-schema-template-bd-help-needed/31634>\
**Category:** Ansible Project\
**Created:** [November 11, 2019, 3:35pm UTC](https://forum.ansible.com/t/aci-mso-schema-template-bd-help-needed/31634 "2019-11-11T15:35:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albert\_Short](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Albert\_Short](https://forum.ansible.com/u/Albert_Short)\
**Post date:** [November 11, 2019, 3:35pm UTC](https://forum.ansible.com/t/aci-mso-schema-template-bd-help-needed/31634/1 "2019-11-11T15:35:02Z")

</div>

Hello all,

I hope someone can assist here.

Trying to use the **[mso\_schema\_template\_bd](https://docs.ansible.com/ansible/latest/modules/mso_schema_template_bd_module.html#mso-schema-template-bd-module)** 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

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 11, 2019, 3:48pm UTC](https://forum.ansible.com/t/aci-mso-schema-template-bd-help-needed/31634/2 "2019-11-11T15:48:46Z")

</div>

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

&nbsp;&nbsp;subnets:  
&nbsp;&nbsp;&nbsp;&nbsp;- description: Some text  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip: 11.11.12.1/24  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no\_default\_gateway: no  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scope: public  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shared: no

or in one line and harder to read

&nbsp;&nbsp;subnets: [{"description": "Some text", "ip": "11.11.12.1/24", "no\_default\_gateway": no, "scope": "public", "shared": no}]

---

<div class="post-metadata">

**Author:** ![Albert\_Short](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Albert\_Short](https://forum.ansible.com/u/Albert_Short)\
**Post date:** [November 11, 2019, 3:51pm UTC](https://forum.ansible.com/t/aci-mso-schema-template-bd-help-needed/31634/3 "2019-11-11T15:51:25Z")

</div>

Kai,

you are a life saver. that worked.

Many thanks for that prompt reply.

Albert
