From 2aedce03593e29c75f5bb84c002506d19709fed5 Mon Sep 17 00:00:00 2001 From: nolte Date: Sat, 11 Jan 2020 18:03:47 +0100 Subject: [PATCH] add first draft for running molecule test with auto manifests deployments --- .travis.yml | 4 ++++ molecule/default/playbook-auto-deploying-manifests.yml | 10 ++++++++++ molecule/default/templates/00-ns-monitoring.yml.j2 | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 molecule/default/playbook-auto-deploying-manifests.yml create mode 100644 molecule/default/templates/00-ns-monitoring.yml.j2 diff --git a/.travis.yml b/.travis.yml index 5664c3a..bacad49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,10 @@ env: - MOLECULE_DISTRO: geerlingguy/docker-fedora31-ansible:latest MOLECULE_PLAYBOOK: playbook-no-deploy.yml + # Test auto deploying manifests + - MOLECULE_DISTRO: geerlingguy/docker-ubuntu1804-ansible:latest + MOLECULE_PLAYBOOK: playbook-auto-deploying-manifests.yml + install: # Install test dependencies. - pip install molecule docker jmespath diff --git a/molecule/default/playbook-auto-deploying-manifests.yml b/molecule/default/playbook-auto-deploying-manifests.yml new file mode 100644 index 0000000..7767ecd --- /dev/null +++ b/molecule/default/playbook-auto-deploying-manifests.yml @@ -0,0 +1,10 @@ +--- +- name: Converge + hosts: all + become: true + vars: + molecule_is_test: true + k3s_server_manifests_templates: + - "ns-monitoring.yml.j2" + roles: + - role: xanmanning.k3s diff --git a/molecule/default/templates/00-ns-monitoring.yml.j2 b/molecule/default/templates/00-ns-monitoring.yml.j2 new file mode 100644 index 0000000..3335b6a --- /dev/null +++ b/molecule/default/templates/00-ns-monitoring.yml.j2 @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: monitoring \ No newline at end of file