Staging
FabricThe Ansible inventory file defines how Ansible will connect and autenticate with NDFC.
The hosts.stage.yml file above defines how Ansible connects and authenticates with NDFC
ndfc:children:stage:
This specifies the inventory data targeting the staging fabric
10.15.0.29:
This is the IP Address of the NDFC Controller
ansible_connection:
Defines the base Ansible plugin used for connecting to the NDFC REST Interface
ansible_httpapi_use_ssl:
Indicates you want to use a secure SSL connection to the NDFC controller
ansible_network_os:
The value cisco.dcnm.dcnm tells Ansible that you want to connect to NDFC/DCNM
ansible_user:
The username used when connecting to NDFC
ansible_password:
The password used when connecting to NDFC
For this lab you are using a clear text password but a best practice is to use Ansible Vault for encrypting passwords!
Reference:
Ansible Vault Documentation
fabric.yml
under group_vars/stage/
A best practice in Ansible is to organize and store your variables that will be used by various playbooks. This file contains the variable data for the following:
This variable data and other variable files you create during this lab will be used in your playbooks throughout the lab.
stage
This data file is stored in the group_vars/stage
directory as it is specific data configuration for your staging or test fabric.
When it comes time to deploy to production you will have a similar file in the group_vars/prod
directory.
let's start building your fabric from the ground up using Ansible.