In this recipe, we will outline how to build an Ansible inventory to describe the network infrastructure setup that we will build across the GCP public cloud. This is a mandatory step that we need to take in order to define all our VPC networks across all the regions that we will deploy our infrastructure in.
Building an Ansible inventory
How to do it...
- Create the hosts file inside the ch9_gcp directory with the following data:
$ cat hosts
[gcp_vpc]
demo_gcp_vpc
- 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_vars folder and the gcp_vpc.yml, which will host all the variables...