Launching the AWS playbook

In Chapter 10, Highly Available Cloud Deployments, we worked through a playbook which used the AWS core Ansible modules to launch a cluster running WordPress; there is a standalone version of the aws-wordpress playbook hosted on GitHub at https://github.com/russmckendrick/aws-wordpress/. Let's use this to deploy our AWS cluster using Ansible Tower. 

Before we move on to configuring the playbook within Ansible Tower, we need to do a little housekeeping on the versions of some of the Python modules that were deployed as part of the Ansible Tower installation. This is because there are parts of our playbook that require later versions of the Boto modules.

To do this, we need to SSH into our Ansible Tower host by running the following command:

$ vagrant ssh

Now that we are logged in as the Vagrant user, we can change the root with:

$ sudo -i

Next, we change to the same Python environment as Ansible Tower uses; to do this, we run the following:

$ source /var/lib/awx/venv/ansible/bin/activate

Now we are using the right environment, we need to upgrade the boto libraries using the following command:

$ pip install boto boto3 botocore --upgrade

Once updated, we can exit the Ansible Tower Python environment by running:

$ deactivate

Then we use the exit command to log out:

Now that we have our environment updated, we can proceed to adding a new project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.8.110