From 2973943f720468c87da1e65c1accd95a00c188d3 Mon Sep 17 00:00:00 2001 From: Bob Vincent Date: Fri, 10 Aug 2018 14:17:36 -0400 Subject: [PATCH] Ensure ansible version is 2.0 or greater. --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0a492c1..3a85aed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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