2019-10-01 22:31:35 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# Thanks to geerlingguy!
|
|
|
|
|
|
|
|
language: python
|
|
|
|
services: docker
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- ROLE_NAME: k3s
|
2020-01-13 22:32:31 +01:00
|
|
|
- ROLE_OWNER: xanmanning
|
|
|
|
- REPO_OWNER: PyratLabs
|
2020-01-12 13:50:03 +01:00
|
|
|
- MOLECULE_SCENARIO: default
|
2019-10-01 22:31:35 +02:00
|
|
|
matrix:
|
2019-12-09 14:53:42 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-debian10-ansible:latest
|
2020-10-17 19:26:30 +02:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-ubuntu2004-ansible:latest
|
2019-10-01 22:31:35 +02:00
|
|
|
|
2019-10-26 23:49:48 +02:00
|
|
|
# Test installing docker
|
2019-12-09 14:53:42 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-centos7-ansible:latest
|
2020-10-17 17:31:04 +02:00
|
|
|
MOLECULE_SCENARIO: docker
|
2019-12-09 18:53:37 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-ubuntu1804-ansible:latest
|
2020-10-17 17:31:04 +02:00
|
|
|
MOLECULE_SCENARIO: docker
|
2019-12-09 18:53:37 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-amazonlinux2-ansible:latest
|
2020-10-17 17:31:04 +02:00
|
|
|
MOLECULE_SCENARIO: docker
|
2019-10-26 23:49:48 +02:00
|
|
|
|
|
|
|
# Test disabling all deployments
|
2019-12-09 14:53:42 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-fedora31-ansible:latest
|
2020-10-17 17:31:04 +02:00
|
|
|
MOLECULE_SCENARIO: nodeploy
|
2019-10-26 23:49:48 +02:00
|
|
|
|
2020-11-10 20:01:05 +01:00
|
|
|
# Test multiple control nodes in control plane with PostgreSQL
|
2020-01-18 10:22:53 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-fedora29-ansible:latest
|
2020-10-17 17:31:04 +02:00
|
|
|
MOLECULE_SCENARIO: highavailabilitydb
|
2020-01-12 17:16:40 +01:00
|
|
|
|
2020-11-10 20:01:05 +01:00
|
|
|
# Test multiple control nodes with auto deploying manifests
|
2020-01-18 10:22:53 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-fedora30-ansible:latest
|
2020-10-17 17:31:04 +02:00
|
|
|
MOLECULE_SCENARIO: autodeploy
|
2020-01-13 22:32:31 +01:00
|
|
|
|
2020-11-10 20:01:05 +01:00
|
|
|
# Test multiple control nodes in control plane with Etcd
|
2020-01-12 17:16:40 +01:00
|
|
|
- MOLECULE_DISTRO: geerlingguy/docker-centos8-ansible:latest
|
2020-10-17 17:31:04 +02:00
|
|
|
MOLECULE_SCENARIO: highavailabilityetcd
|
2020-01-11 18:03:47 +01:00
|
|
|
|
2019-10-01 22:31:35 +02:00
|
|
|
install:
|
|
|
|
# Install test dependencies.
|
2020-10-17 17:31:04 +02:00
|
|
|
- pip install -r molecule/requirements.txt
|
2019-10-01 22:31:35 +02:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
# Use actual Ansible Galaxy role name for the project directory.
|
|
|
|
- cd ../
|
2020-01-13 22:32:31 +01:00
|
|
|
- mv ansible-role-${ROLE_NAME} ${ROLE_OWNER}.${ROLE_NAME}
|
|
|
|
- cd ${ROLE_OWNER}.${ROLE_NAME}
|
2019-10-01 22:31:35 +02:00
|
|
|
|
|
|
|
script:
|
|
|
|
# Run tests.
|
2020-01-12 13:50:03 +01:00
|
|
|
- molecule test --scenario-name "${MOLECULE_SCENARIO}"
|
2019-10-01 22:31:35 +02:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|