From cec48cec1c75577b65d20d05c44f04006f5627ed Mon Sep 17 00:00:00 2001 From: David Farrington Date: Tue, 24 Feb 2015 21:41:18 +0000 Subject: [PATCH] Add idempotence test --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9b906393..a202ed93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,5 +8,10 @@ install: - pip install ansible==1.5.0 script: - echo localhost > inventory - - ansible-playbook --syntax-check -i inventory test.yml + - ansible-playbook -i inventory test.yml --syntax-check - ansible-playbook -i inventory test.yml --connection=local --sudo + - > + ansible-playbook -i inventory test.yml --connection=local --sudo + | grep -q 'changed=0.*failed=0' + && (echo 'Idempotence test: pass' && exit 0) + || (echo 'Idempotence test: fail' && exit 1)