diff --git a/.travis.yml b/.travis.yml index 9c7741b..31b6acb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,9 @@ install: script: - echo localhost > inventory - ansible-playbook --syntax-check -i inventory test.yml - - ansible-playbook -i inventory test.yml --connection=local --sudo -vvvv + - 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) diff --git a/tasks/main.yml b/tasks/main.yml index 48a34ee..f2bd979 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,5 +20,4 @@ - name: Check the installation command: composer -V --no-ansi register: composer_result - changed_when: "'Composer version' in composer_result.stdout" failed_when: "'Composer version' not in composer_result.stdout" \ No newline at end of file