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

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

matrix:
  allow_failures:
    - env: version=">=2.7,<2.8" 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.7,<2.8" distro="debian-unstable"
    - env: version="" distro="debian-unstable"
    - env: version="devel" distro="debian-unstable"
    - env: version="devel" distro="fedora-latest"
    - env: version=">=2.7,<2.8" 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.7,<2.8" 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: "mYOHaSRDBSnw58PRnQB3JPf92saah4d9c6p0zLKWj7SOzc8uOqxbrXTaoHUouoNIVbZuNl64zruYWBZSUCk3ReBFcRWTU+qi0OuQU1ifTeBIH/eM50saQYgjEdMFeN1FYbgI75x2aDJ0go+2qU3kZFvdwDh7xs1McBf2MNKo8Xlwe20jPy8jUyBlp66+DOFJ+W7EGbGkgvUzW5YWlAaL9ItHrDoaup++dBc1RlHDidz/cvfaMzw9XeXTjATOYm9/VhQsHOa9sVKWVe102E6M+uphoel1gjdHSPYLvno85DiK08kJPIvRu+3hvbkWAJKu6H1ILp2g3uF13jZpibTIIaSbXLUCXa2gYi252pUs4+blwuRy7onS67HLiUqG9aufKhcFxgeCvpcn/Au1pMnhLKVG3M9yWe3FxiAzjgfU0rSz/tHhwEr3m1MwylA+k3gfir3uDS6JsFlkAy/6aNRYDoL693yPB/Y1cNHdJTQf5VJ0kcwx/5FGz+1MdxzW2Mw8uTQJa42c1dDOeL6YgkPDbbgCvRP3mh+rHAGn8SGp6O9QzSwTdMwnNMw087N+3Onw1rDsnYVX3KS/j7oqS0TABiPF8SCze8cgW6X1V+5hFD+5H8dhcE05naQicU6Abr+pyA++c5q5AKtg2tbenMAZB+9tkPfF1C+q12HasnNGMl8="
  email: false
