---
language: python
python: "2.7"

# This role needs sudo, thus we can't use the new container infrastructure
# sudo: false
sudo: required

# Install ansible
addons:
  apt:
    packages:
    - python-pip

install:
  - pip install -r requirements.txt

script:
  - cookiecutter --version
  - cookiecutter --replay --config-file tests/cookiecutterrc .
  - cd test_project
  # Resolve dependencies(When target role isn't installed via Ansible Galaxy, auto resolution of dependencies doesn't occur.
  - ansible-galaxy install FGtatsuro.python-requirements
  - ansible-playbook tests/test.yml -i tests/inventory -l localhost --connection=local -vvvv

---
# https://docs.travis-ci.com/user/multi-os/
matrix:
  include:
    - os: osx
      language: generic
    - os: linux
      dist: trusty
      language: python
      python: 2.7

# This role needs sudo, thus we can't use the new container infrastructure
# sudo: false
sudo: required

install:
  - sudo pip install -r requirements.txt

script:
  - cookiecutter --replay --config-file tests/cookiecutterrc .
  - cd test_project
  # Resolve dependencies(When target role isn't installed via Ansible Galaxy, auto resolution of dependencies doesn't occur.)
  - ansible-galaxy install FGtatsuro.python-requirements
  - ansible-playbook tests/test.yml -i tests/inventory -l localhost --connection=local -vvvv

Test of this project also supports OSX.
Test of this project also supports OSX.
