Running the Playbook
Now that we have all the roles needed to deploy our resources into AWS, we can run the playbook. To start with, we need to let Ansible know our access key and secret by running the following commands with your own credentials to set the environment variables:
$ export AWS_ACCESS_KEY=AKIAI5KECPOTNTTVM3EDA $ export AWS_SECRET_KEY=Y4B7FFiSWl0Am3VIFc07lgnc/TAtK5+RpxzIGTr
With environment variables set, you kick off the Ansible run by using the following command:
$ ansible-playbook -i hosts site.yml
Unlike previous chapters, where we just looked at the end of the playbook run, here we will look at some highlights of what happens when we deploy our resources.
Playbook run highlights
This is not the complete playbook output, and when running the playbook, I have not enabled debug, so all those tasks will be skipped.
We start with the VPC:
PLAY [Deploy and configure the AWS Environment] *********** TASK [Gathering Facts] *************************...