---
language: python
python: '2.7'
sudo: false
branches:
  only:
    - master
    - stable
addons:
  apt:
    sources:
      - python-apt
      - python-pycurl

matrix:
  allow_failures:
    - env: PIP_ANSIBLE_VERSION='>=2.0'
  fast_finish: true

env:
  global:
    - TEST_ANSIBLE_HOSTNAME: localhost
      TEST_ANSIBLE_CONNECTION: local
  matrix:
    - PIP_ANSIBLE_VERSION: "'>=1.9,<2.0'"
    - PIP_ANSIBLE_VERSION: "'>=2.0'"

install:
    - pip install --upgrade pip
    - pip install -r requirements.txt
    - pip install "ansible --pre $PIP_ANSIBLE_VERSION"
script:
  - ansible-playbook --version
  - export TEST_TEMP_FILE=`mktemp /tmp/config.XXXXXXXXXX`
  - ansible-playbook --syntax-check -i test/inventory test/playbook.yml
  - ansible-playbook  -i test/inventory -l travis test/playbook.yml --connection=local -vvvv
...

---
language: python
python: '2.7'
sudo: false
branches:
  only:
    - master
    - stable
addons:
  apt:
    sources:
      - python-apt
      - python-pycurl

matrix:
  allow_failures:
    - env: PIP_ANSIBLE_VERSION='>=2.0'
  fast_finish: true

env:
  global:
    - TEST_ANSIBLE_HOSTNAME: localhost
      TEST_ANSIBLE_CONNECTION: local
  matrix:
    - PIP_ANSIBLE_VERSION: "'>=1.9,<2.0'"
    - PIP_ANSIBLE_VERSION: "'>=2.0'"

install:
    - pip install --upgrade pip
    - pip install -r requirements.txt
    - pip install --pre "ansible $PIP_ANSIBLE_VERSION"
script:
  - ansible-playbook --version
  - export TEST_TEMP_FILE=`mktemp /tmp/config.XXXXXXXXXX`
  - ansible-playbook --syntax-check -i test/inventory test/playbook.yml
  - ansible-playbook  -i test/inventory -l travis test/playbook.yml --connection=local -vvvv
...

Order is important in pip
Order is important in pip
