summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2022-01-04 12:15:54 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2022-01-05 13:31:46 +0100
commitc342c357701382d5fc0b2d7f9296e0cd46d108ad (patch)
tree50a320c8cc522869b6c22c1b0b2cb11e5362bd7e
parent2f02293cd2a1f0a94f0c30bc18cbfe35d3fbc551 (diff)
[MOLECULE] Add molecule setup for cert_manager.yml playbook
Change-Id: I8d6847ac2f201ff3218c02f4ee0406042cea9ee2 Issue-ID: OOM-2908 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rw-r--r--ansible/test/play-cert_manager/.yamllint12
-rw-r--r--ansible/test/play-cert_manager/molecule/default/converge.yml8
-rw-r--r--ansible/test/play-cert_manager/molecule/default/molecule.yml23
-rw-r--r--ansible/test/play-cert_manager/molecule/default/prepare.yml10
-rw-r--r--ansible/test/play-cert_manager/molecule/default/vars.yml4
5 files changed, 57 insertions, 0 deletions
diff --git a/ansible/test/play-cert_manager/.yamllint b/ansible/test/play-cert_manager/.yamllint
new file mode 100644
index 00000000..c5ae64be
--- /dev/null
+++ b/ansible/test/play-cert_manager/.yamllint
@@ -0,0 +1,12 @@
+---
+extends: default
+
+rules:
+ braces:
+ max-spaces-inside: 1
+ level: error
+ brackets:
+ max-spaces-inside: 1
+ level: error
+ line-length: disable
+ truthy: disable
diff --git a/ansible/test/play-cert_manager/molecule/default/converge.yml b/ansible/test/play-cert_manager/molecule/default/converge.yml
new file mode 100644
index 00000000..30a27785
--- /dev/null
+++ b/ansible/test/play-cert_manager/molecule/default/converge.yml
@@ -0,0 +1,8 @@
+---
+- name: Initialize
+ hosts: all
+ tasks:
+ - name: Include variables
+ include_vars: vars.yml
+
+- import_playbook: ../../../../cert_manager.yml
diff --git a/ansible/test/play-cert_manager/molecule/default/molecule.yml b/ansible/test/play-cert_manager/molecule/default/molecule.yml
new file mode 100644
index 00000000..32d2cf4f
--- /dev/null
+++ b/ansible/test/play-cert_manager/molecule/default/molecule.yml
@@ -0,0 +1,23 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint: |
+ set -e
+ yamllint .
+ ansible-lint .
+ flake8
+platforms:
+ - name: infrastructure-play-cert-manager
+ image: centos:7
+ groups:
+ - infrastructure
+provisioner:
+ name: ansible
+ env:
+ ANSIBLE_ROLES_PATH: ../../../../test/roles
+ ANSIBLE_LIBRARY: ../../../../library
+verifier:
+ name: testinfra
+ directory: ../../../../roles/cert-manager/molecule/default/tests/
diff --git a/ansible/test/play-cert_manager/molecule/default/prepare.yml b/ansible/test/play-cert_manager/molecule/default/prepare.yml
new file mode 100644
index 00000000..542484c3
--- /dev/null
+++ b/ansible/test/play-cert_manager/molecule/default/prepare.yml
@@ -0,0 +1,10 @@
+---
+- name: Prepare infra
+ hosts: infrastructure
+ pre_tasks:
+ - name: Include infrastructure group variables
+ include_vars: ../../../../group_vars/infrastructure.yml
+ - name: Include test setup variables
+ include_vars: vars.yml
+ roles:
+ - prepare-cert-manager
diff --git a/ansible/test/play-cert_manager/molecule/default/vars.yml b/ansible/test/play-cert_manager/molecule/default/vars.yml
new file mode 100644
index 00000000..1e89dc76
--- /dev/null
+++ b/ansible/test/play-cert_manager/molecule/default/vars.yml
@@ -0,0 +1,4 @@
+---
+app_name: onap
+app_data_path: "/opt/{{ app_name }}"
+cmctl_version: 1.6.1