Change travis.sh (help idempotence debug)

pull/14/head
Emilien Mantel 2016-09-25 14:43:32 +02:00
parent a1a40f5ff4
commit 121ce27456
1 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ ansible-playbook -i $INVENTORY_FILE -c local --syntax-check -vv $PLAYBOOK
ansible-playbook -i $INVENTORY_FILE -c local -e "{ mysql_vendor: $VENDOR, mysql_origin: $ORIGIN }" --sudo -vv $PLAYBOOK
# Check indempotence
ansible-playbook -i $INVENTORY_FILE -c local -e "{ mysql_vendor: $VENDOR, mysql_origin: $ORIGIN }" --sudo -vv $PLAYBOOK \
| grep -q 'changed=0.*failed=0' \
ansible-playbook -i $INVENTORY_FILE -c local -e "{ mysql_vendor: $VENDOR, mysql_origin: $ORIGIN }" --sudo -vv $PLAYBOOK > idempot.txt
grep -q 'changed=0.*failed=0' idempot.txt \
&& (echo 'Idempotence test: pass' && exit 0) \
|| (echo 'Idempotence test: fail' && exit 1)
|| (echo 'Idempotence test: FAIL' && cat idempot.txt && exit 1)