---
language: python

python:
  - "2.7"
rvm:
  - "2.2"
gemfile:
  - tests/Gemfile
env:
  - ANSIBLE="ansible"
  - ANSIBLE="ansible==1.8.4"
  - ANSIBLE="ansible==1.9.1"

install:
  - pip install $ANSIBLE

script:
  - ansible-playbook -i tests/dummy.hosts --syntax-check tests/role.yml
  - ansible-playbook -i tests/dummy.hosts --sudo -v --diff tests/role.yml
  - >
    ansible-playbook -i tests/dummy.hosts --sudo tests/role.yml
    | grep -q 'changed=0.*failed=0'
    && (echo 'Idempotence test: pass' && exit 0)
    || (echo 'Idempotence test: fail' && exit 1)
  - >
    cd tests
    rake local

---
language: python

python:
  - "2.7"
env:
  - ANSIBLE="ansible"
  - ANSIBLE="ansible==1.8.4"
  - ANSIBLE="ansible==1.9.1"

install:
  - sudo apt-get update
  - sudo apt-get install -y ruby rake ruby-bundler
  - pip install $ANSIBLE

script:
  - ansible-playbook -i tests/dummy.hosts --syntax-check tests/role.yml
  - ansible-playbook -i tests/dummy.hosts --sudo -v --diff tests/role.yml
  - >
    ansible-playbook -i tests/dummy.hosts --sudo tests/role.yml
    | grep -q 'changed=0.*failed=0'
    && (echo 'Idempotence test: pass' && exit 0)
    || (echo 'Idempotence test: fail' && exit 1)
  - cd tests
  - bundle
  - rake local

Install ruby manually in Travis
Install ruby manually in Travis
