AWS CLI Ansible Playbook on Ubuntu 14.04

Here's a simple Ansible playbook that installs the AWS CLI and all the required dependencies on Ubuntu 14.04 - should work on other versions of Ubuntu too.

Setup

  • Clone or download the jveldboom/ansible-aws-cli repo to your Ansible machine
  • Add your host information within inventories/hosts
  • Add your AWS creditentials within vars/vars.yml

Run Playbook

Below is how I prefer to run Ansible playbooks since it allows you to choose the host and SSH user dynamically.

ansible-playbook -i inventories/hosts playbook.yml --extra-vars="hosts=vagrant user=vagrant" --ask-pass

The `--extra-vars` parameter sets the "host" and "user" variable in the `playbook` file. And `--ask-pass` will prompt you for a password.


comments powered by Disqus