The AWS playbook
As mentioned at the start of the chapter, we are going to be using some more advanced techniques when it comes to deploying resources in AWS where possible; I have tried to allow the resources to be deployed as dynamically as possible, a lot of which comes down to how we define our variables, which is where we are going to start our playbook review.
The playbook variables
Most of the variables we define can be found in group_vars/common.yml
, and as you can see from the following, they start by looking a lot like the variables we described in Chapter 9, Moving to the Cloud:
debug_output: false app: name: "learnansible" region: "eu-west-1" env: "prod"
As you can see, we have the same debug_output
feature flag and selection of variables used to describe our app and the AWS region in which it will be launched.
Next up, we have the resource names:
vpc_name: "{{ app.name }}-{{ app.env...