Using Ansible to Create, Delete and List Tenants
Prepare the Environment In this demonstration I am using Cygwin to run the python/ansible scripts in a Windows environment. All my attempts to install ansible via ‘pip install’ in a Windows failed, the number of Stack Overflow posts reporting this problem seems to concur with this. Handy hint: To cd to a windows C: drive in Cygwin use: [code language="text"] cd /cygdrive/c [/code] To use Ansible with the APIC sandbox host, you will need to first establish a few files before you can start writing your playbooks. Verify that the installed ansible version is 2.8.x, and that it is using Python3: Create ansible.cfg file This file is used by Ansible to tell it that the inventory file is called hosts (unless overridden), to disable gathering of facts by default, and to disable the saving of retry files when playbooks stop with errors: ansible.cfg [code language="python"] [defaults] # Use local hosts file inventory = hosts # Disable automatic fac...