---
sudo: required
language: python
services: docker

env:
  - version=">=2.6,<2.7" distro="alpine-latest"
  - version="" distro="alpine-latest"
  - version="devel" distro="alpine-latest"
  - version=">=2.6,<2.7" distro="alpine-edge"
  - version="" distro="alpine-edge"
  - version="devel" distro="alpine-edge"
  - version=">=2.6,<2.7" distro="archlinux"
  - version="" distro="archlinux"
  - version="devel" distro="archlinux"
  - version=">=2.6,<2.7" distro="centos-6"
  - version="" distro="centos-6"
  - version="devel" distro="centos-6"
  - version=">=2.6,<2.7" distro="centos-latest"
  - version="" distro="centos-latest"
  - version="devel" distro="centos-latest"
  - version=">=2.6,<2.7" distro="debian-latest"
  - version="" distro="debian-latest"
  - version="devel" distro="debian-latest"
  - version=">=2.6,<2.7" distro="debian-stable"
  - version="" distro="debian-stable"
  - version="devel" distro="debian-stable"
  - version=">=2.6,<2.7" distro="debian-unstable"
  - version="" distro="debian-unstable"
  - version="devel" distro="debian-unstable"
  - version=">=2.6,<2.7" distro="fedora-latest"
  - version="" distro="fedora-latest"
  - version="devel" distro="fedora-latest"
  - version=">=2.6,<2.7" distro="fedora-rawhide"
  - version="" distro="fedora-rawhide"
  - version="devel" distro="fedora-rawhide"
  - version=">=2.6,<2.7" distro="opensuse-leap"
  - version="" distro="opensuse-leap"
  - version="devel" distro="opensuse-leap"
  - version=">=2.6,<2.7" distro="ubuntu-rolling"
  - version="" distro="ubuntu-rolling"
  - version="devel" distro="ubuntu-rolling"
  - version=">=2.6,<2.7" distro="ubuntu-latest"
  - version="" distro="ubuntu-latest"
  - version="devel" distro="ubuntu-latest"
  - version=">=2.6,<2.7" distro="ubuntu-devel"
  - version="" distro="ubuntu-devel"
  - version="devel" distro="ubuntu-devel"

matrix:
  allow_failures:
    - env: version=">=2.6,<2.7" distro="alpine-edge"
    - env: version="" distro="alpine-edge"
    - env: version="devel" distro="alpine-edge"
    - env: version="devel" distro="alpine-latest"
    - env: version="devel" distro="archlinux"
    - env: version="devel" distro="centos-6"
    - env: version="devel" distro="centos-latest"
    - env: version="devel" distro="debian-latest"
    - env: version="devel" distro="debian-stable"
    - env: version=">=2.6,<2.7" distro="debian-unstable"
    - env: version="" distro="debian-unstable"
    - env: version="devel" distro="debian-unstable"
    - env: version="devel" distro="fedora-latest"
    - env: version=">=2.6,<2.7" distro="fedora-rawhide"
    - env: version="" distro="fedora-rawhide"
    - env: version="devel" distro="fedora-rawhide"
    - env: version="devel" distro="opensuse-leap"
    - env: version="devel" distro="ubuntu-rolling"
    - env: version=">=2.6,<2.7" distro="ubuntu-devel"
    - env: version="" distro="ubuntu-devel"
    - env: version="devel" distro="ubuntu-devel"
    - env: version="devel" distro="ubuntu-latest"

cache:
  - pip

install:
  - pip install --upgrade pip
  - if [ "${version}" != "devel" ] ; then pip install ansible"${version}" ; fi
  - if [ "${version}" = "devel" ] ; then pip install git+https://github.com/ansible/ansible.git@devel ; fi
  - pip install molecule
  - pip install docker

script:
  - if [ "${expectation}" = "fail" ] ; then ! molecule test --scenario-name "${distro}" ; else molecule test --scenario-name "${distro}" ; fi

notifications:
  webhooks: https://galaxy.ansible.com/api/v1/notifications/
  slack:
    secure: "qaGtGqE0v0I1bzGWPPW2lLOesDQQ4g4l0fW3I7iJMf3f1YASWi3QXN/0H6i3lcO3VGok+k2yGXlZyG6dwMUPkz0jCv8iFsbKCiNnewVBbMX2L/gGhinl5n6rzw/Udkg/k+/CKZ7k+Bem/JDSgmIGVAyxzdmkRK0RxuhCurFQnlEUSEDNFekIKybuTccja6zbsuyX/gWZjEDxRdODpBPAslTFJSK/V5BOz49RGpka3kOvwt8PmoJZVkZwVMLcRzvyQORN3aUylivtl5kjxehA8dMLPgZTGd9g4oagDRsk5y9yFmUeV3XVYTBEec0QvCzsJ54M5D133ButcXutFfzlsIr5bpcizD46eRS9L6dmRuB9Xi9l5tVPponlJPG1kVJTJA8TsbDHWC4Dn3M8tOPNxGovy0c2V6Y0O2T6fG4PxmuBPAecrnxZg+pmWoZcR5KuaqHFdGhef+gKuM2r6JrBwPyytt0zz74/o+kiWp7koiRh2S5DIR6d65LKOf9j688AGitJJWsDqgcvNYZcWUsghtOVLbGd4KGq1PscJsAQGUW5yXtrbyUhu3pSDr/EmWH9JA69J9J1JdcczgZfX9lW7uNUVLWo53on2I64snOxlkXi/lWje2DujqE6tVYGsrHFq9eVw1s8aaIwVs2t0GgdJQJqgDhnbNFjio9CbFcHKy8="

  email: false
