Templates for ansible development.
localenv
: Supporting code necessary to help provide a Vagrant environment for local development, applicable both to playbooks and roles
role
: Files necessary for a role, taken pretty much exactly from ansible-galaxy init
playbook
: Files to get started developing a playbook
init.rb
: Method to automatically apply templates to a given ditectory
init.rb
simply nondestructively copies the appropriate templates from the directories in this repository to a destination repository.
init.rb
destination {playbook|role}
will create a structure for either a role or a playbook in the specified destination directory.
Let's say you need to update your box, say because kitchen-ansible
isn't doing an apt-get update
before
trying to install things, your box is too old, but a new box hasn't been published by opscode.
In that casse , the box would be called 'opscode-ubuntu-14.04' by default
If you need to create a new box for kitchen, try something like this:
- start up the box,
kitchen converge
. It doesn't matter if it's failing. kitchen login
,sudo
and- apt-get remove ansible
- apt-get update
- apt-get install -y software-properties-common
- apt-add-repository ppa:ansible/ansible
- apt-get install ansible You should have 1.8.2 now.
cd ./kitchen/kitchen-vagrant/default-ubuntu-1404
vagrant box remove opscode-ubuntu-14.04
- Package the box you just started with
vagrant package --output sps-ubuntu-1404.box
- Add the package in under the old box name.
vagrant box add --name opscode-ubuntu-14.04 sps-ubuntu-1404.box
kitchen destroy
kitchen converge
You should be converging on the right version of ansible now.