---
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="opensuse-tumbleweed"
  - version="" distro="opensuse-tumbleweed"
  - version="devel" distro="opensuse-tumbleweed"
  - version=">=2.6,<2.7" distro="ubuntu-artful"
  - version="" distro="ubuntu-artful"
  - version="devel" distro="ubuntu-artful"
  - 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="opensuse-tumbleweed"
    - env: version="devel" distro="ubuntu-artful"
    - 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: "JjQ9pD480OBxFgIgB4r2KC8WBhypDoYg3clRHpCMrzj/BaC+ZwT7xuibG6RjhZNkSslM31Y8rdpaw9GsxKFGqiUQW3WA0Q/lQA2+DtDuFBEozR4I7ZuxF2fvWJZ6O3i8IypAVrmYgbDn1FZJg+mHHbI2VavSIKtdhEj1Gd6Ml5rzFIdnRe86DTQ678WCHbgLZ3XYduYYLaApO53WGYYgryUBNg870f7uJHsDiUTYBB9uT+9uCB4ET/cYa+D4T53O2tXmcXTbS7tz8ibdaM3RT4f/6+PnIlSwG+qZvu9ven7hplTqWzOCKlbeKYhVnmkjdQRYKRBbzMM1Z3uJvDHi1mPplE3L4fom8/K8nFLYpwqSK6gg9Zq8cAA2IQEnccir4itEIFWe1N1cJGECUSh8w4s+J6zu88FAaMfhoJ59sDYuQSQEYZoqHM7CJp5Y+eQ8rKAMNAX+J8ZnDr8Ycz5Y/9f0ORn+opQ+H7pfNQiEhMwYo6snaT7IkoPSJ5cIJpKFlHQM0ZWlVkwHf3YkF+XT4j+tizbnNUAp4TEasZe1GnVTa2tcyZHMlMmVTVkD5eYos1MbTqNTcNbpHhusRMfJLxtrnbC/mYVgPM6RrF/uekKWUBWylTx9Od9QqhHl4Q0ZJ/YRHoXJqKVRzC/BPUlJCmdmYo1pjYwS3iguUVkh9XE="
  email: false
