Skip to content

Instantly share code, notes, and snippets.

@ebridges
Created October 27, 2014 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebridges/7cbdcc708c2078f74690 to your computer and use it in GitHub Desktop.
Save ebridges/7cbdcc708c2078f74690 to your computer and use it in GitHub Desktop.
#!/bin/sh
### Requires python virtualenv to be available
if [ ! -e playbook-test ]; then
mkdir playbook-test
fi
cd playbook-test
virtualenv pbtest
source pbtest/bin/activate
git clone git@github.com:ansible/ansible.git
pushd ansible
git checkout v1.7.2
git submodule update --init lib/ansible/modules/core
git submodule update --init lib/ansible/modules/extras
git submodule update --init v2/ansible/modules/core
git submodule update --init v2/ansible/modules/extras
pushd hacking
source env-setup
popd
popd
pip install pyyaml jinja2 nose passlib pycrypto
touch realfile.txt
cat << EOF > playbook.yml
---
- hosts: all
gather_facts: False
tasks:
- name: link a file
file: src=realfile.txt dest=linkfile.txt state=link
EOF
echo 'localhost ansible_connection=local' > hosts.ini
ansible-playbook playbook.yml -i hosts.ini
ansible --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment