Last active
May 6, 2016 10:39
-
-
Save evrardjp/41db06752bb2d9ad54b0740b29527c7b to your computer and use it in GitHub Desktop.
CI testing for ansible roles
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
apt-get update -qq | |
apt-get install -qq git git-core python2.7 python-dev python-apt python-pycurl libyaml-dev libpython2.7-dev build-essential libssl-dev libffi-dev |
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
ansible-playbook test.yml --connection=local --syntax-check -i 127.0.0.1, | |
ansible-playbook test.yml --connection=local --sudo -i 127.0.0.1, | |
ansible-playbook test.yml --connection=local --sudo -i 127.0.0.1, | tee /tmp/output.txt; grep -q 'changed=0.*failed=0' /tmp/output.txt && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment