Ansible Configuration - mangei/onion-routing GitHub Wiki

Install ansible

apt-get install ansible python-boto

Since we will run a provision playbook we will need to specify an inventory file with localhost

vim /etc/ansible/hosts
[local]
127.0.0.1

We then add the private key to login to the machines to the server:

vim /etc/ansible/ansible.cfg
private_key_file = /etc/ansible/private.key
host_key_checking = False

vim /etc/ansible/private.key
# paste key

# protect teh key
chmod 400 /etc/ansible/private.key

Run the playbook:

ansible-playbook provision.yml

Add the a short helper script:

vim /usr/bin/provision_nodes

#!/usr/bin/env bash
ansible-playbook /root/onion-routing/provision/provision.yml

chmod +x /usr/bin/provision_nodes