--- sudo: required dist: trusty language: python python: "2.7" env: - ANSIBLE_VERSION=latest - ANSIBLE_VERSION=2.2.1.0 - ANSIBLE_VERSION=2.2.0.0 - ANSIBLE_VERSION=2.1.4 - ANSIBLE_VERSION=2.1.3 - ANSIBLE_VERSION=2.1.2 - ANSIBLE_VERSION=2.1.1.0 - ANSIBLE_VERSION=2.1.0.0 - ANSIBLE_VERSION=2.0.2.0 - ANSIBLE_VERSION=2.0.1.0 - ANSIBLE_VERSION=2.0.0.2 - ANSIBLE_VERSION=2.0.0.1 - ANSIBLE_VERSION=2.0.0.0 - ANSIBLE_VERSION=1.9.6 branches: only: - master before_install: - sudo apt-get update -qq # Remove sysfs - sudo apt-get remove --purge --yes sysfsutils install: # Install Ansible. - if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi - if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible-lint; fi script: # Check the role/playbook's syntax. - ansible-playbook -i tests/inventory tests/test.yml --syntax-check # Run the role/playbook with ansible-playbook. - ansible-playbook -i tests/inventory tests/test.yml -vvvv # Run the role/playbook again, checking to make sure it's idempotent. - > ansible-playbook -i tests/inventory tests/test.yml | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - if [ "$ANSIBLE_VERSION" = "latest" ]; then ansible-lint tests/test.yml || true; fi notifications: email: false hipchat: rooms: secure: eOerhJlsjpUfLkMit2sADka6RC+XDMPVyU93x593zyAKcYs0SqXitZ+rdxtwg9lMF8a4JlYzgElBw2CxkToRwcRSCQju11p+KrZADV9IgEjzVSNcDjfGGilKYIg/rL7g4jeUA4XLsWTwjowClGxgdkPE20F+senw10H2DWu4NTEGGiTHozvIB/zTxuhhXT97kl3ACcj5crkm3QDDje3iVFG8v7dmSToRo8NNg9jYQq15cKbY1LKLKNCEA6Ov8VFG0FDux4C8ZaaaZOzw64MwVH2lORAH48g8QUznhuRGuRqQlXOqoD45cxwmbDxBsDDJl36YvTEilRl3CK2wiK7sLhHuKQTCdkqZN+CLo0yKQhq8cc91ZUIuaV1l3grYybHUn1kkB/VJZzkNv2ldmreT0uiFEz0VwC4iIiO8FCE6m96eTZtcwMlIb5ePFb8Nnupn/Hb7dZ/ag7UQp8fmrfbQ2lAen9siL08EAdMg89eFKcxYu5P2nLMAcuwbUIR473ZQ86SZfRYmZr5qP3KEuTDiKPTrAjd15STXS4wIqB2ksEVAX8RVlPLqf31M+2us3LCRIM/XKLNN78tNdbeWw5EyTsmx/VroqPpt0YEoDLfyIoHJDG8eXePLhOzs272SNXhiDnAhIBGuYXZEDTzExYry4bHSSVNTGP+qpywo1GhUxS4= webhooks: https://galaxy.ansible.com/api/v1/notifications/