Created
October 27, 2014 14:45
-
-
Save ebridges/7cbdcc708c2078f74690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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