Skip to content

Ansible Provisioner for Aminator

Peter Sankauskas edited this page Aug 14, 2013 · 2 revisions

The Ansible Provisioner for Aminator allows you to run an Ansible playbook to build a custom AMI. Some examples of how to structure your playbooks can be found in the NetflixOSS-Ansible project.

Foundation AMI for the Ansible Provisioner

The only requirement for a Foundation AMI to be used with the Ansible Provisioner is that Ansible already be installed.

The easy way is to use one of the pre-built Foundation AMIs:

https://github.com/Answers4AWS/netflixoss-ansible/wiki/Foundation-AMIs-for-Aminator

or you can follow the Creation of an Ubuntu 12.04 foundation AMI instructions and make your own. Before snapshotting remember to install Ansible.

Installing Ansible via RPM:

http://www.ansibleworks.com/docs/gettingstarted.html#via-rpm

Installing Ansible via APT:

http://www.ansibleworks.com/docs/gettingstarted.html#ubuntu-and-debian

or use the PPA:

https://launchpad.net/~rquillo/+archive/ansible

Using the Ansible Provisioner

Once you have the Foundation AMI created, you can run a playbook like this:

aminate -e ec2_ansible_linux -B ami-fndat10n my-playbook.yml

Sometimes it is useful to pass extra variables to your Ansible playbook. This can be done with the --extra-vars command line parameter. Example:

aminate -e ec2_ansible_linux -B ami-fndat10n --extra-vars "local_war=$HOME/asgard.war" asgard-ubuntu.yml