<?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: cisco aci automation using ansible in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913627#M3188</link>
    <description>&lt;P&gt;Can you post the contents of your inventory file + playbook?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 08:17:36 GMT</pubDate>
    <dc:creator>Marcel Zehnder</dc:creator>
    <dc:date>2023-08-29T08:17:36Z</dc:date>
    <item>
      <title>cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913612#M3187</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="diff-delete"&gt;Am new to cisco aci automation using ansible. i&lt;/SPAN&gt; am using windows 11 and installed WSL (ubuntu)&lt;SPAN class="diff-delete"&gt;. then&lt;/SPAN&gt;&lt;SPAN class="diff-add"&gt;, then&lt;/SPAN&gt; installed python and ansible.&lt;SPAN class="diff-add"&gt; I&lt;/SPAN&gt; got&lt;SPAN class="diff-add"&gt; an&lt;/SPAN&gt; error when &lt;SPAN class="diff-delete"&gt;i&lt;/SPAN&gt; execute the below command &lt;SPAN class="diff-delete"&gt;. Please help on how to fix this issue. how can we access sandbox from virtual VM machine.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN class="diff-add"&gt;home@IBM-PF35CWE8:~/aci_ansible_learning_labs_code_samples/intro_module$ ansible-playbook -i inventory 01_aci_tenant_pb.yml
What would you like to name your Tenant?: vs_1008

PLAY [ENSURE APPLICATION CONFIGURATION EXISTS] *************************************************************************

TASK [ENSURE APPLICATIONS TENANT EXISTS] *******************************************************************************
fatal: [sandboxapicdc.cisco.com]: FAILED! =&amp;gt; {"changed": false, "error": {"code": "400", "text": "Failed to parse login request"}, "msg": "Authentication failed: 400 Failed to parse login request"}

PLAY RECAP *************************************************************************************************************
sandboxapicdc.cisco.com    : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 07:59:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913612#M3187</guid>
      <dc:creator>vijays19</dc:creator>
      <dc:date>2023-08-29T07:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913627#M3188</link>
      <description>&lt;P&gt;Can you post the contents of your inventory file + playbook?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 08:17:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913627#M3188</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-08-29T08:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913650#M3189</link>
      <description>&lt;P&gt;inventory&lt;/P&gt;
&lt;P&gt;[apic:vars]&lt;BR /&gt;username=admin&lt;BR /&gt;password=!v3G@!4@Y&lt;BR /&gt;ansible_python_interpreter="/usr/bin/python3"&lt;/P&gt;
&lt;P&gt;[apic]&lt;BR /&gt;sandboxapicdc.cisco.com&lt;/P&gt;
&lt;P&gt;Tenant config&lt;/P&gt;
&lt;P&gt;name: ENSURE APPLICATION CONFIGURATION EXISTS&lt;BR /&gt;hosts: apic&lt;BR /&gt;connection: local&lt;BR /&gt;gather_facts: False&lt;BR /&gt;vars_prompt:&lt;BR /&gt;- name: "tenant"&lt;BR /&gt;prompt: "What would you like to name your Tenant?"&lt;BR /&gt;private: no&lt;/P&gt;
&lt;P&gt;tasks:&lt;BR /&gt;- name: ENSURE APPLICATIONS TENANT EXISTS&lt;BR /&gt;aci_tenant:&lt;BR /&gt;host: "{{ ansible_host }}"&lt;BR /&gt;username: "{{ username }}"&lt;BR /&gt;password: "{{ password }}"&lt;BR /&gt;state: "present"&lt;BR /&gt;validate_certs: False&lt;BR /&gt;tenant: "{{ tenant }}"&lt;BR /&gt;description: "Tenant Created Using Ansible"&lt;BR /&gt;~ ~&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 08:55:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913650#M3189</guid>
      <dc:creator>vijays19</dc:creator>
      <dc:date>2023-08-29T08:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913893#M3190</link>
      <description>&lt;P&gt;Can you test again, your files work for me.&lt;/P&gt;
&lt;P&gt;inventory&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;[apic:vars]
username=admin
password=!v3G@!4@Y

[apic]
sandboxapicdc.cisco.com&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;test.yml&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;- name: ENSURE APPLICATION CONFIGURATION EXISTS
  hosts: apic
  connection: local
  gather_facts: False
  vars_prompt:
   - name: "tenant"
     prompt: "What would you like to name your Tenant?"
     private: no

  tasks:
    - name: ENSURE APPLICATIONS TENANT EXISTS
      aci_tenant:
        host: "{{ ansible_host }}"
        username: "{{ username }}"
        password: "{{ password }}"
        state: "present"
        validate_certs: False
        tenant: "{{ tenant }}"
        description: "Tenant Created Using Ansible"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ouput&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;(default) maercu@CHLT303344:~/dev/ciscocomtest$ ansible-playbook -i inventory test.yml
What would you like to name your Tenant?: blablabla

PLAY [ENSURE APPLICATION CONFIGURATION EXISTS] *************************************************************************

TASK [ENSURE APPLICATIONS TENANT EXISTS] *******************************************************************************
changed: [sandboxapicdc.cisco.com]

PLAY RECAP *************************************************************************************************************
sandboxapicdc.cisco.com    : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 13:27:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913893#M3190</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-08-29T13:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913932#M3191</link>
      <description>&lt;P&gt;Playbook all looks good, i think the 400 is red flag and the sandbox/API was busy - it was taking an age for the UI to load this morning. This sandbox gets a lot of use daily.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 14:13:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913932#M3191</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-08-29T14:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913944#M3192</link>
      <description>&lt;P&gt;Hi Marcel,&lt;/P&gt;
&lt;P&gt;Thanks for your response.&lt;/P&gt;
&lt;P&gt;Do i need to remove ansible_python_interpreter="/usr/bin/python3" from inventory. from your output its not there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 14:26:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913944#M3192</guid>
      <dc:creator>vijays19</dc:creator>
      <dc:date>2023-08-29T14:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913953#M3193</link>
      <description>&lt;P&gt;Have you installed the collection for ACI?&lt;/P&gt;
&lt;PRE&gt;ansible-galaxy collection install cisco.aci&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;q.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 14:45:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913953#M3193</guid>
      <dc:creator>qsnyder</dc:creator>
      <dc:date>2023-08-29T14:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913958#M3194</link>
      <description>&lt;P&gt;No I didnt install it. i will do it now.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 14:50:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913958#M3194</guid>
      <dc:creator>vijays19</dc:creator>
      <dc:date>2023-08-29T14:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913979#M3195</link>
      <description>&lt;P&gt;Agree, overlooked this one (tought its a 401 and some user/password issue) - but you're right, might be overload situation.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 15:19:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913979#M3195</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-08-29T15:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913980#M3196</link>
      <description>&lt;P&gt;Most propably you don't need it.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 15:20:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4913980#M3196</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-08-29T15:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4914018#M3197</link>
      <description>&lt;P&gt;Looks like you installed the "batteries included" version of ansible with the aci collection already included - the galaxy install is only needed, if you install only the ansible-core version. But anyway, Quinn's input is valid - upgrading the collection won't hurt:&lt;/P&gt;
&lt;PRE&gt;ansible-galaxy collection install cisco.aci --upgrade&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Aug 2023 15:42:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4914018#M3197</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-08-29T15:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4914089#M3198</link>
      <description>&lt;P&gt;As of Ansible 2.10 (which was released about 5 years ago) -- Ansible no longer includes external modules.&lt;/P&gt;
&lt;P&gt;If the OP installed a fresh version of Ansible without statically setting the version in the installation or requirements file -- then he needs to install the collection.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 16:51:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4914089#M3198</guid>
      <dc:creator>qsnyder</dc:creator>
      <dc:date>2023-08-29T16:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4914334#M3201</link>
      <description>&lt;P&gt;Yeah I know that, Quinn. Sorry I should have been more precise: I was refering the ansible version installed via pip (&lt;EM&gt;pip install ansible&lt;/EM&gt; vs.&lt;EM&gt; pip install ansible-core&lt;/EM&gt;). The "normal" python package (aka &lt;SPAN&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="docutils literal"&gt;ansible&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;community package - which is installed via &lt;EM&gt;pip install ansible&lt;/EM&gt;&lt;/SPAN&gt;) still includes the most common collections including ACI (&lt;A href="https://pypi.org/project/ansible/" target="_blank" rel="noopener"&gt;https://pypi.org/project/ansible/&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 06:08:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4914334#M3201</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-08-30T06:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4922009#M3203</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1581860"&gt;@vijays19&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I noticed some change in the collection version 2.7, try to explicit set the use_ssl param (will check the code of the collection to understand what's happening):&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;- name: ENSURE APPLICATION CONFIGURATION EXISTS
  hosts: apic
  connection: local
  gather_facts: False
  vars_prompt:
   - name: "tenant"
     prompt: "What would you like to name your Tenant?"
     private: no

  tasks:
    - name: ENSURE APPLICATIONS TENANT EXISTS
      aci_tenant:
        host: "{{ ansible_host }}"
        username: "{{ username }}"
        password: "{{ password }}"
        state: "present"
        validate_certs: False
        use_ssl: true
        tenant: "{{ tenant }}"
        description: "Tenant Created Using Ansible"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 11:09:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4922009#M3203</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-09-12T11:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4922014#M3204</link>
      <description>&lt;P&gt;Found it, the default param for use_ssl was removed in version 2.7.0&lt;BR /&gt;&lt;A href="https://github.com/CiscoDevNet/ansible-aci/blob/v2.6.0/plugins/module_utils/aci.py#L126" target="_blank" rel="noopener"&gt;https://github.com/CiscoDevNet/ansible-aci/blob/v2.6.0/plugins/module_utils/aci.py#L126&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://github.com/CiscoDevNet/ansible-aci/blob/v2.7.0/plugins/module_utils/aci.py#L134" target="_blank" rel="noopener"&gt;https://github.com/CiscoDevNet/ansible-aci/blob/v2.7.0/plugins/module_utils/aci.py#L134&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;An issue/PR is already open:&amp;nbsp;&lt;A href="https://github.com/CiscoDevNet/ansible-aci/issues/466" target="_blank" rel="noopener"&gt;https://github.com/CiscoDevNet/ansible-aci/issues/466&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 11:24:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4922014#M3204</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-09-12T11:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: cisco aci automation using ansible</title>
      <link>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4922016#M3205</link>
      <description>&lt;P&gt;Just to add it to the end of the list:&lt;BR /&gt;&lt;BR /&gt;Collection 2.7.0 is affected by a bug: You need to explicit set &lt;EM&gt;use_ssl&lt;/EM&gt; to true. For example:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;- name: Create tenant
      aci_tenant:
        host: xyz.apic.com
        username: admin
        password: supersecret
        validate_certs: false
        state:present
        use_ssl: true&lt;/LI-CODE&gt;
&lt;P&gt;The default value for &lt;EM&gt;use_ssl&lt;/EM&gt; was removed in version 2.7.0&lt;BR /&gt;&lt;A href="https://github.com/CiscoDevNet/ansible-aci/blob/v2.6.0/plugins/module_utils/aci.py#L126" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/CiscoDevNet/ansible-aci/blob/v2.6.0/plugins/module_utils/aci.py#L126&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://github.com/CiscoDevNet/ansible-aci/blob/v2.7.0/plugins/module_utils/aci.py#L134" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/CiscoDevNet/ansible-aci/blob/v2.7.0/plugins/module_utils/aci.py#L134&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;An issue/PR is already open:&amp;nbsp;&lt;A href="https://github.com/CiscoDevNet/ansible-aci/issues/466" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/CiscoDevNet/ansible-aci/issues/466&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Marcel&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 11:30:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/cisco-aci-automation-using-ansible/m-p/4922016#M3205</guid>
      <dc:creator>Marcel Zehnder</dc:creator>
      <dc:date>2023-09-12T11:30:11Z</dc:date>
    </item>
  </channel>
</rss>

