--- language: python python: "2.7" before_install: - sudo apt-get update -qq - sudo apt-get install -qq python-apt python-pycurl install: - pip install ansible script: - echo localhost > inventory - ansible-playbook --syntax-check -i inventory test.yml - 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)