In this recipe, we will outline how to build an Ansible inventory to describe the network infrastructure setup that we will build across the Azure public cloud. This is a necessary step as we will define all of our virtual networks across all of the regions in which we will deploy our infrastructure.
Building an Ansible inventory
How to do it...
- Create the hosts file inside the ch8_Azure directory with the following data:
$ cat hosts
[az_net]
eu_az_net
us_az_net
[eu]
eu_az_net
[us]
us_az_net
- Create the Ansible.cfg file with the following content:
$ cat Ansible.cfg
[defaults]
inventory=hosts
retry_files_enabled=False
gathering=explicit
host_key_checking=False
action_warnings=False
- Create the group_var folder and the eu.yml and us.yml...