Overview

Prerequisites

  • Ansible 2.4.2 or later is required
  • You must update the ~/.ssh/config file to include your keypair so the playbook can access the VMs in AWS. To do this, include the following line in you config file:
IdentityFile ~/.ssh/mykeypair.pem

Where mykeypair is the name of your keypair. Obviously you need to have a copy of mykeypair.pem in the .ssh directory as well in order for it to be used.

Also, you need to have read+write for user only permissions set on ~/.ssh/config, like so:

chmod 600 ~/.ssh/config

Otherwise you'll encounter 'bad owner or permissions on ssh/config' error message.

Ansible Compatibility

Note that some specific versions of Ansible will not work due to bugs, here is a list of the ones I am aware of:

Run

./playbook-run.sh

Note the above is just an example, please update all variables including the pool name which is correct for your situation.