summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-06-08 15:27:01 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2021-06-08 15:27:01 +0200
commit9519958511ef093fac6febab03bd282c267b106a (patch)
tree18c59e95663729e498e6db7e2c10dd1632f73a0e /ansible/roles
parent86722b84d8dec4a671d7fcb86f54be6197ffdff8 (diff)
[MOLECULE] Add setup for new 'k8s-persistent-volume' role
Change-Id: If7eb6c058746a98566f41d8354159624293ba58d Issue-ID: INT-1926 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/k8s-persistent-volume/.yamllint12
-rw-r--r--ansible/roles/k8s-persistent-volume/molecule/default/converge.yml12
-rw-r--r--ansible/roles/k8s-persistent-volume/molecule/default/molecule.yml23
-rw-r--r--ansible/roles/k8s-persistent-volume/molecule/default/vars.yml2
4 files changed, 49 insertions, 0 deletions
diff --git a/ansible/roles/k8s-persistent-volume/.yamllint b/ansible/roles/k8s-persistent-volume/.yamllint
new file mode 100644
index 00000000..c5ae64be
--- /dev/null
+++ b/ansible/roles/k8s-persistent-volume/.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/roles/k8s-persistent-volume/molecule/default/converge.yml b/ansible/roles/k8s-persistent-volume/molecule/default/converge.yml
new file mode 100644
index 00000000..4e15b3c8
--- /dev/null
+++ b/ansible/roles/k8s-persistent-volume/molecule/default/converge.yml
@@ -0,0 +1,12 @@
+---
+- name: Converge
+ hosts: all
+ pre_tasks:
+ - name: Include kubernetes group variables
+ include_vars: ../../../../group_vars/kubernetes.yml
+ - name: Include test scenario variables
+ include_vars: vars.yml
+ tasks:
+ - name: "Include k8s-persistent-volume"
+ include_role:
+ name: "k8s-persistent-volume"
diff --git a/ansible/roles/k8s-persistent-volume/molecule/default/molecule.yml b/ansible/roles/k8s-persistent-volume/molecule/default/molecule.yml
new file mode 100644
index 00000000..dbbf0d81
--- /dev/null
+++ b/ansible/roles/k8s-persistent-volume/molecule/default/molecule.yml
@@ -0,0 +1,23 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint: |
+ set -e
+ yamllint .
+ ansible-lint .
+ flake8
+platforms:
+ - name: infrastructure-k8s-persistent-volume
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
+ pre_build_image: true
+ groups:
+ - infrastructure
+provisioner:
+ name: ansible
+ env:
+ ANSIBLE_ROLES_PATH: ../../../../test/roles
+ ANSIBLE_LIBRARY: ../../../../library
+verifier:
+ name: testinfra
diff --git a/ansible/roles/k8s-persistent-volume/molecule/default/vars.yml b/ansible/roles/k8s-persistent-volume/molecule/default/vars.yml
new file mode 100644
index 00000000..ce473376
--- /dev/null
+++ b/ansible/roles/k8s-persistent-volume/molecule/default/vars.yml
@@ -0,0 +1,2 @@
+---
+k8s_volumes: []