language: python
env:
  - ANSIBLE_VERSION="1.2.*" SYMLINK="true"
  - ANSIBLE_VERSION="1.3.*" SYMLINK="true"
  - ANSIBLE_VERSION="1.4.*"
  - ANSIBLE_VERSION="1.5.*"
  - ANSIBLE_VERSION="1.6.*"
  - ANSIBLE_VERSION="1.7.*"
  - ANSIBLE_VERSION="1.8.*"
  - ANSIBLE_VERSION="1.9.*"
install:
  - if test "$SYMLINK" == "true" ; then ln -s . ansible-role-shout ; fi
  - pip install ansible==$ANSIBLE_VERSION
  - sudo apt-get install supervisor
script:
  # Check the role syntax
  - ansible-playbook --inventory='localhost,' tests/test.yml --syntax-check
  # Check that the role can run with no errors/failures
  - ansible-playbook --inventory='localhost,' tests/test.yml --connection=local
  # Check idempotence of the role by running it twice and making sure there are
  # no changed/failed tasks
  - >
    ansible-playbook --inventory='localhost,' tests/test.yml --connection=local
    | tee /dev/stderr
    | grep -q 'changed=0.*failed=0'
    && (printf '\n*** Idempotence test: ok ***\n' && exit 0)
    || (printf "\n*** Idempotence test: failed ***\n" && exit 1)
  - bash tests/tests.sh
sudo: required

language: python
env:
  - ANSIBLE_VERSION="1.9.*"
  - ANSIBLE_VERSION="1.8.*"
  - ANSIBLE_VERSION="1.7.*"
  - ANSIBLE_VERSION="1.6.*"
  - ANSIBLE_VERSION="1.5.*"
  - ANSIBLE_VERSION="1.4.*"
  - ANSIBLE_VERSION="1.3.*" SYMLINK="true"
  - ANSIBLE_VERSION="1.2.*" SYMLINK="true"
install:
  - if test "$SYMLINK" == "true" ; then ln -s . ansible-role-shout ; fi
  - pip install ansible==$ANSIBLE_VERSION
  - sudo apt-get install supervisor
script:
  # Check the role syntax
  - ansible-playbook --inventory='localhost,' tests/test.yml --syntax-check
  # Check that the role can run with no errors/failures
  - ansible-playbook --inventory='localhost,' tests/test.yml --connection=local
  # Check idempotence of the role by running it twice and making sure there are
  # no changed/failed tasks
  - >
    ansible-playbook --inventory='localhost,' tests/test.yml --connection=local
    | tee /dev/stderr
    | grep -q 'changed=0.*failed=0'
    && (printf '\n*** Idempotence test: ok ***\n' && exit 0)
    || (printf "\n*** Idempotence test: failed ***\n" && exit 1)
  - bash tests/tests.sh
sudo: required

Revert Ansible versions in Travis CI config so that they are run from most recent to oldest
Revert Ansible versions in Travis CI config so that they are run from most recent to oldest
