---
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: "DIjA6Mnh2fpuFs+CYMtn1DX0o1DWqiz5Jz4v39fjeF+CJsG0vMFpmHunRwqftVnGUpsJKrjH9zxZXL5EkAtMif4ROC885h+uc0YgWoNl1cnlZUfljD3+34+EjutW6W/wcijxqy7v0LqracBScDSErUzBnZO6fBUFdf/6KIsyWxOrKTEH4cjt5SocEDUYUy3CQZDIU4pXdfoliWPnb0MDjiRN2NV4paB5R2CQ0NawlUV8gwrA5hKOUGD6ca0LNOF/tnkOcF8qJKox4AyYMXvAJdieFO/aWQG5tZg2y5+yDXqQPyjuTTX7XiqNUpdyeP0mwR27eAO/R7LBiRMqiYPFkT2ttSN4ufKWToGX51lAZXZWmKfy8lKcFxszVwthJj4PQvjLcY/xbk9Ze1o+yz/1H4eBdmXEVD+H9SX3j2wToerbhktHcv+Uf62xrug8UglxQsSJFHRWaSkiC6ZWw5Awce+9LxHi8VK9ubnFKD7wK5iY+Gved4A7HvwSUQJQfCeNnyvmsLwacnr1DGTUzm0/LkbtkAQMh4h5ouDN5b1vwalcADHFZmmqtDeocZQL6m8E42Fvkpkllfo0tJV67aN3Of6fq/e/I5Ac+dOqJ0MQkclnGG4+HvSa12MAoTKhrgFIBkpJI/083i6eoRsmIT2gtHwGzclVNKJmRERcrVLLa1s="
  email: false
