init commit

This commit is contained in:
Vassiliy Yegorov
2020-07-08 16:03:52 +07:00
commit edaa556a5e
30 changed files with 633 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
---
language: python
python: "2.7"
sudo: required
dist: trusty
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt python-pycurl
install:
- sudo pip install ansible
- echo -e 'localhost ansible_connection=local' > tests/inventory
- echo -e '[defaults]\nroles_path = ../\nhostfile = ./tests/inventory' > ansible.cfg
script:
- ansible-playbook --syntax-check tests/role.yml
- ansible-playbook -v --diff 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)