To execute an Ansible playbook you simply just use ansible-playbook
. You are going to use our own
host file, so you must specify -i hosts
, where -i
is for inventory and
hosts
is the inventory file name. Lastly, you must specify the playbook file,
site.yml
.
In the terminal window in the ansible directory you should run the following command:
cd ~/ltrdcn-3225/ansible/playbooks/aci
ansible-playbook -i hosts site.yml
This command should produce the following output:
PLAY [apic] ************************************************************************************************************************************************************** TASK [Gathering Facts] *************************************************************************************************************************************************** ok: [10.0.226.41] TASK [apic : CREATE ACI TENANT VRF] ************************************************************************************************************************************** changed: [10.0.226.41] TASK [apic : CREATE ACI TENANT VRF] ************************************************************************************************************************************** changed: [10.0.226.41] TASK [apic : Create DB Bridge Domain] ************************************************************************************************************************************ changed: [10.0.226.41] TASK [apic : Create Subnet for DB Bridge Domain] ************************************************************************************************************************* changed: [10.0.226.41] TASK [apic : Create DB Bridge Domain] ************************************************************************************************************************************ changed: [10.0.226.41] TASK [apic : Create Subnet for BRidge Domain] **************************************************************************************************************************** changed: [10.0.226.41] TASK [apic : Create ACI Tenant Application Profile] ********************************************************************************************************************** changed: [10.0.226.41] TASK [apic : Create Database EPG] **************************************************************************************************************************************** changed: [10.0.226.41] TASK [apic : Create Java APP EPG] **************************************************************************************************************************************** changed: [10.0.226.41] PLAY RECAP *************************************************************************************************************************************************************** 10.0.226.41 : ok=10 changed=9 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
And the ACI fabric is now configured. If you run the command again, you will notice that Ansible indicates
that the setting is ok:
. Which means that the configuration is already
at the intended state that you set.
You can re-run the scripts as many times as you wish and Ansible will validate that the configuration is setup this way. If you modify the script in any way, like changing the subnet IP or the mask you will notice that it will indicate changed as it modifies that configuration.
Click on the following link to connect to the APIC. The credentials for your login are:
And you will be located on your Tenant Landing page that will be something similar to the following:
You may need to close the Meet Cisco APIC 5.2(5c) by clicking the Let's Go! button, then the Get Started button
And you can see in the summary that we have Application EPGs, VRFfs, Bridge Domains configured. You can expand
the application profiles and networking menus on the left to further see this configuration if desired.