Ensure ansible version is 2.0 or greater.

This commit is contained in:
Bob Vincent 2018-08-10 14:17:36 -04:00
parent 275c9afcd4
commit 2973943f72

View file

@ -15,7 +15,13 @@ install:
- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"
script:
# Check the roles syntax
# Check the ansible version.
- >
ansible --version
| grep -q '^ansible 2'
&& (echo 'Ansible 2.0+ test: pass' && exit 0)
|| (echo 'Ansible 2.0+ test: fail' && exit 1)
# Check the roles syntax.
- "ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/test.yml --syntax-check"
# Run the role