---
language: python
python: 2.7

env:
  - SITE=playbook.yml

before_install:
  - sudo apt-get update -qq

install:
  - pip install ansible
  - "printf '[defaults]\nroles_path = ../' > ansible.cfg"

script:
  - "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"
  - "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo"
  - >
    ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo
    | grep -q 'changed=0.*failed=0'
    && (echo 'Idempotence test: pass' && exit 0)
    || (echo 'Idempotence test: fail' && exit 1)

---
language: python
python: 2.7

env:
  - SITE=playbook.yml

before_install:
  - sudo apt-get update -qq

install:
  - pip install ansible
  - "printf '[defaults]\nroles_path = ..' > ansible.cfg"

script:
  - "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"
  - "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo"
  - >
    ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo
    | grep -q 'changed=0.*failed=0'
    && (echo 'Idempotence test: pass' && exit 0)
    || (echo 'Idempotence test: fail' && exit 1)

Remove slash on Travis build
Remove slash on Travis build
