In this recipe, we will outline how to build an Ansible inventory to describe the infrastructure network setup that we will build across the AWS public cloud. This is a mandatory step in order to define all of our VPCs across all the regions where we will deploy our infrastructure.
Building an Ansible inventory
How to do it...
- Create a new ch7_aws folder and create a hosts file inside it, as shown here:
$ cat hosts
[us]
us_prod_vpc
[eu]
eu_prod_vpc
[prod_vpcs]
us_prod_vpc
eu_prod_vpc
- Create the ansible.cfg file inside ch7_aws with the contents shown here:
$ cat ansible.cfg
[defaults]
inventory=hosts
vault_password_file=~/.ansible_vault_passwd
gathering=explicit
transport=local
retry_files_enabled=False
action_warnings=False...