This repository has been archived by the owner on Jan 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #6 This commit changes the Travic CI pipeline to run ansible in a docker container and additionally tests the deployment tasks. Updated README.md to contain new test script
- Loading branch information
Sean Johnson
authored and
Matt Rasband
committed
May 22, 2017
1 parent
8db86ed
commit b1048ec
Showing
13 changed files
with
57 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
sudo: required | ||
|
||
language: python | ||
|
||
python: | ||
- "3.5" | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
- echo "${ANSIBLE_VAULT_PASSWORD}" > .pass | ||
- docker pull geerlingguy/docker-ubuntu1604-ansible | ||
|
||
install: | ||
- pip install ansible | ||
|
||
script: | ||
- ansible-playbook -i environments/test_inventory prepare_ubuntu16.04.yml | ||
- ansible-playbook -i environments/test_inventory test.yml --syntax-check | ||
- "ansible-playbook -i environments/test_inventory test.yml -vvv --sudo" | ||
- "ansible-playbook -i environments/test_inventory test.yml --sudo | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)" | ||
- docker run -h testserver -t -i -v $PWD:/data geerlingguy/docker-ubuntu1604-ansible /data/run_tests.sh |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,10 @@ letsencrypt_run: false | |
systemd_enabled: false | ||
ansible_connection: local | ||
travis_ci: true | ||
email: [email protected] | ||
sirbot_domain: sirbot.pyslackers.com | ||
pythondev_domain: pyslackers.com | ||
SIRBOT_SLACK_TOKEN: "" | ||
SIRBOT_SLACK_BOT_TOKEN: "" | ||
SIRBOT_SLACK_VERIFICATION_TOKEN: "" | ||
SIRBOT_GITHUB_SECRET: "" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
[sirbot] | ||
pythondev-01 | ||
|
||
[test] | ||
testserver ansible_connection=local |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
apt-get update | ||
pushd /data | ||
ansible-playbook -i environments/inventory test.yml --vault-password-file=.pass --syntax-check | ||
ansible-playbook -i environments/inventory test.yml --vault-password-file=.pass | ||
ansible-playbook -i environments/inventory test.yml --vault-password-file=.pass -v | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) | ||
|
||
|
||
|
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