-
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.
- Loading branch information
Arslanbekov Denis
committed
Jan 16, 2018
1 parent
8f57cfc
commit ad9b78a
Showing
7 changed files
with
37 additions
and
48 deletions.
There are no files selected for viewing
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,23 +1,32 @@ | ||
--- | ||
services: docker | ||
language: python | ||
python: "2.7" | ||
sudo: required | ||
dist: trusty | ||
services: | ||
- docker | ||
|
||
env: | ||
- distro: centos7 | ||
- distro: ubuntu1604 | ||
- distro: ubuntu1404 | ||
- distro: debian8 | ||
before_install: | ||
- sudo apt-get update -qq | ||
|
||
script: | ||
# Configure test script so we can run extra tests after playbook is run. | ||
- export container_id=$(date +%s) | ||
|
||
# Download test shim. | ||
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/ | ||
- chmod +x ${PWD}/tests/test.sh | ||
|
||
# Run tests. | ||
- ${PWD}/tests/test.sh | ||
install: | ||
- sudo pip install docker-py | ||
- sudo apt-get install -y sshpass software-properties-common python-software-properties | ||
- sudo apt-add-repository -y ppa:ansible/ansible | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -y ansible | ||
- echo -e 'localhost ansible_connection=local' > tests/inventory | ||
- echo -e '[defaults]\nroles_path = ../\nhostfile = ./tests/inventory' > ansible.cfg | ||
- sudo rm /usr/bin/python && sudo ln -s /usr/bin/python2.7 /usr/bin/python | ||
- ansible --version | ||
|
||
script: | ||
- ansible-playbook --syntax-check tests/role.yml | ||
- ansible-playbook -v --diff tests/role.yml | ||
- > | ||
ansible-playbook tests/role.yml | ||
| grep -q 'changed=0.*failed=0' | ||
&& (echo 'Idempotence test: pass' && exit 0) | ||
|| (echo 'Idempotence test: fail' && exit 1) | ||
notifications: | ||
email: false | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- hosts: 'localhost' | ||
roles: | ||
- role: 'gridrouter-docker' | ||
become: yes |
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 @@ | ||
localhost ansible_connection=local ansible_python_interpreter=/usr/local/bin/python |
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,5 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
roles: | ||
- { role: ../../gridrouter-docker } |
This file was deleted.
Oops, something went wrong.