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:

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:

Installing Ansible via APT:

or use the PPA:

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