Skip to content
Brad Smith edited this page Jan 29, 2015 · 2 revisions

Loading the ansible SSH key

This is required for many of the tasks below

sudo -i
eval $(ssh-agent -s)
ssh-add ~/.ssh/provisioning

Quicker testing by calling playbooks directly

Running bootstrap.sh spends a lot of time checking for dependencies, updating repos, etc.

To test changes to a role more quickly, load the ansible SSH key as described above, and then...

cd /usr/local/tunapanda/provision/playbooks/
ansible-playbook -i ../scripts/inventory.py main.yml

You can also create a custom playbook and use it instead of main.yml

Listing all ansible variables

Any of these variables can be used in {{ substitutions }} and when: statements in your roles and playbooks.

Load the ansible SSH key and then...

ansible -m setup -i /usr/local/tunapanda/provision/scripts/inventory.py localhost > ~/ansible_vars
less ~/ansible_vars