---

language: python
python: "2.7"
sudo: required
dist: trusty
services:
  - docker

env:
  matrix:
    - IMAGE_NAME="ubuntu-upstart:14.04"
    - IMAGE_NAME="ubuntu:16.04-builded"
    - IMAGE_NAME="debian:8-builded"
    - IMAGE_NAME="debian:9-builded"
    - IMAGE_NAME="centos:7-builded"
    - IMAGE_NAME="centos:6-builded"
    - IMAGE_NAME="fedora:27-builded"
install:
  - pip install ansible=="2.4.4.0" docker-py
  - ln -s ${PWD} tests/docker/ANXS.postgresql

script:
  # Syntax check
  - ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml --syntax-check

  # Play test
  - ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml

  # Idempotence test
  - ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml > idempotence_out
  - ./tests/idempotence_check.sh idempotence_out

notifications:
  webhooks: https://galaxy.ansible.com/api/v1/notifications/

---

language: python
python: "2.7"
sudo: required
dist: trusty
services:
  - docker

env:
  matrix:
    - IMAGE_NAME="ubuntu-upstart:14.04"
    - IMAGE_NAME="ubuntu:16.04-builded"
    - IMAGE_NAME="debian:8-builded"
    - IMAGE_NAME="debian:9-builded"
    - IMAGE_NAME="centos:7-builded"
    - IMAGE_NAME="centos:6-builded"
# Missing PostgreSQL v9.3 #    - IMAGE_NAME="fedora:27-builded"
install:
  - pip install ansible=="2.4.4.0" docker-py
  - ln -s ${PWD} tests/docker/ANXS.postgresql

script:
  # Syntax check
  - ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml --syntax-check

  # Play test
  - ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml

  # Idempotence test
  - ansible-playbook -i tests/docker/hosts -e image_name=${IMAGE_NAME} tests/docker/site.yml > idempotence_out
  - ./tests/idempotence_check.sh idempotence_out

notifications:
  webhooks: https://galaxy.ansible.com/api/v1/notifications/

Disable Fedora testing, as PostgreSQL v9.3 doesn't exist
Disable Fedora testing, as PostgreSQL v9.3 doesn't exist
