<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ACI Ansible Role AEP Domain Link Error in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072699#M110</link>
    <description>&lt;P&gt;LOL! &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Sergiu beat me to it and his solution is far more helpful than mine!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 18:51:30 GMT</pubDate>
    <dc:creator>Claudia de Luna</dc:creator>
    <dc:date>2020-04-23T18:51:30Z</dc:date>
    <item>
      <title>ACI Ansible Role AEP Domain Link Error</title>
      <link>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072534#M106</link>
      <description>&lt;P&gt;I'm not sure if this is the right area to post this, but has anyone played with the ACI Ansible role from Code Exchange?:&amp;nbsp;&lt;A href="https://developer.cisco.com/codeexchange/github/repo/datacenter/ansible-role-aci-model" target="_blank" rel="noopener"&gt;https://developer.cisco.com/codeexchange/github/repo/datacenter/ansible-role-aci-model&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified it to build an ACI topology in my home lab using the ACI Simulator. Everything works perfectly except linking AEPs to Domains.&lt;/P&gt;&lt;P&gt;Here's my Ansible inventory, AEP/Domain sections:&lt;/P&gt;&lt;PRE&gt;- aep:
        - name: External-AAEP
          domain:
          - name: L3-Ext-Dom
        - name: Phys-AAEP
          domain:
          - name: Phys-Dom
      - external_routed_domain:
        - name: L3-Ext-Dom
          vlan_pool: Phys-VLAN-Pool
          vlan_pool_alloc: static
      - physical_domain:
        - name: Phys-Dom
          vlan_pool: Phys-VLAN-Pool
          vlan_pool_alloc: static&lt;/PRE&gt;&lt;P&gt;When I run the Ansible playbook I get this:&lt;/P&gt;&lt;P&gt;failed: [apic1 -&amp;gt; localhost] (item={'access_policy_aep_name': 'External-AAEP', 'access_policy_aep_domain_name': 'L3-Ext-Dom'}) =&amp;gt; {"ansible_loop_var": "item", "changed": false, "error": {"code": "120", "text": "unknown property value uni/infra/attentp-External-AAEP/rsdomP-[uni/L3-Ext-Dom], name dn, class infraRsDomP [(Dn0)] Dn0=, "}, "item": {"access_policy_aep_domain_name": "L3-Ext-Dom", "access_policy_aep_name": "External-AAEP"}, "msg": "APIC Error 120: unknown property value uni/infra/attentp-External-AAEP/rsdomP-[uni/L3-Ext-Dom], name dn, class infraRsDomP [(Dn0)] Dn0=, ", "status": -1}&lt;BR /&gt;failed: [apic1 -&amp;gt; localhost] (item={'access_policy_aep_name': 'Phys-AAEP', 'access_policy_aep_domain_name': 'Phys-Dom'}) =&amp;gt; {"ansible_loop_var": "item", "changed": false, "error": {"code": "120", "text": "unknown property value uni/infra/attentp-Phys-AAEP/rsdomP-[uni/Phys-Dom], name dn, class infraRsDomP [(Dn0)] Dn0=, "}, "item": {"access_policy_aep_domain_name": "Phys-Dom", "access_policy_aep_name": "Phys-AAEP"}, "msg": "APIC Error 120: unknown property value uni/infra/attentp-Phys-AAEP/rsdomP-[uni/Phys-Dom], name dn, class infraRsDomP [(Dn0)] Dn0=, ", "status": -1}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas? Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:15:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072534#M106</guid>
      <dc:creator>AJ Cruz</dc:creator>
      <dc:date>2020-04-23T16:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: ACI Ansible Role AEP Domain Link Error</title>
      <link>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072668#M107</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/324518"&gt;@AJ Cruz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed the same problem. There are some problems there because the role is using aci_rest module, an there are some limitations there, for example: you have multiple types of existing domains (example phys, l3domains as you have in your inventory file), and each have a different format for the DN. But in the role there is only a task which creates phy domains using aci_rest. So you either have to create multiple tasks for each type of domain, either, change most of tasks from the role, as I did, with existing specific modules. Here is how i changed it:&lt;/P&gt;&lt;P&gt;In the Inventory I added type attribute for domains:&lt;/P&gt;&lt;PRE&gt;      - aep:
        - name: ansible_aep
          domain:
          - name: ansible_phydom
&lt;STRONG&gt;            type: phys&lt;/STRONG&gt;
          - name: ansible_l3dom
&lt;STRONG&gt;            type: l3dom&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;In the role, I changed aci_rest with aci_aep_to_domain:&lt;/P&gt;&lt;PRE&gt;  - name: Link AEPs to domains
    aci_aep_to_domain:
      &amp;lt;&amp;lt;: *aci_login
      aep: '{{ item.access_policy_aep_name }}'
      domain: '{{ item.access_policy_aep_domain_name }}'
      domain_type: '{{ item.access_policy_aep_domain_type }}'
    with_items: '{{ aci_model_data|aci_listify("access_policy","aep", "domain") }}'&lt;/PRE&gt;&lt;P&gt;Much cleaner and nicer. Of course, not all existing objects have dedicated modules (mostly related to L3Out), but if is there, why not use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will update my project soon on github. You will find there a role for standalone Nexus switches as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Sergiu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 17:47:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072668#M107</guid>
      <dc:creator>Sergiu.Daniluk</dc:creator>
      <dc:date>2020-04-23T17:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: ACI Ansible Role AEP Domain Link Error</title>
      <link>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072675#M108</link>
      <description>&lt;P&gt;Thanks, I see it now, when I intercept the POST from creating the link in the GUI I noticed either a "uni/phys-" or a "uni/l3out-" in the tDn.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll re-structure the inventory as you suggested to fix that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:09:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072675#M108</guid>
      <dc:creator>AJ Cruz</dc:creator>
      <dc:date>2020-04-23T18:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: ACI Ansible Role AEP Domain Link Error</title>
      <link>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072698#M109</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/324518"&gt;@AJ Cruz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks like this is an older role. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found that as ACI matures some subtle changes occur as the MIT gets enhanced and on occasion changed.&lt;/P&gt;&lt;P&gt;Looks like the role is balking at rsdomP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"msg": "APIC Error 120: unknown property value uni/infra/attentp-Phys-AAEP/&lt;STRONG&gt;rsdomP&lt;/STRONG&gt;-[uni/Phys-Dom], name dn, class infraRsDomP [(Dn0)] Dn0=, ",&lt;BR /&gt;&lt;BR /&gt;which, if you look at the actual post URI and payload (below) wants &lt;STRONG&gt;infraRsDomP.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I actually can't get a clean run of this repo on my simulator but mine fails on other objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll fiddle with it and report back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FWIW I have always found it much easier to work with the act_rest module if I'm using Ansible. &amp;nbsp;In truth I never use Ansible to build out the fabric (but it is handy for ongoing operations so good to learn for sure). &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;url: https: //10.1.10.111/api/node/mo/uni/infra/attentp-EXTERNAL-AAEP.json
	payload {
		"&lt;STRONG&gt;infraRsDomP&lt;/STRONG&gt;": {
			"attributes": {
				"tDn": "uni/l3dom-L3-Ext-Dom",
				"status": "created,modified"
			},
			"children": []
		}
	}&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:50:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072698#M109</guid>
      <dc:creator>Claudia de Luna</dc:creator>
      <dc:date>2020-04-23T18:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: ACI Ansible Role AEP Domain Link Error</title>
      <link>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072699#M110</link>
      <description>&lt;P&gt;LOL! &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Sergiu beat me to it and his solution is far more helpful than mine!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:51:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4072699#M110</guid>
      <dc:creator>Claudia de Luna</dc:creator>
      <dc:date>2020-04-23T18:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: ACI Ansible Role AEP Domain Link Error</title>
      <link>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4090038#M111</link>
      <description>&lt;P&gt;I converted all the raw rest calls to use native ansible modules, restructured the topology file a bit, and made a small change to the jinja filter to allow it to accept a list as a value (for listing leaves when adding static paths).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here it is:&amp;nbsp;&lt;A href="https://github.com/aj-cruz/aci-ansible-role.git" target="_blank"&gt;https://github.com/aj-cruz/aci-ansible-role.git&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 15:10:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/aci-ansible-role-aep-domain-link-error/m-p/4090038#M111</guid>
      <dc:creator>AJ Cruz</dc:creator>
      <dc:date>2020-05-21T15:10:58Z</dc:date>
    </item>
  </channel>
</rss>

