summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2022-01-05 12:32:31 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2022-01-05 12:32:31 +0100
commitc4a84befb5832fe61f94f489c7edacf115eed615 (patch)
treed9568fad3dc7083264547035fc48dc577acceae2 /ansible/roles
parent1965bc7fa8da4bc116e56fb4f967a82a4a51cb80 (diff)
[MOLECULE] Add 'ubuntu' scenario for 'k8s-persistent-volume' role
Change-Id: I79b1cc4757ce5b45afae3f13b05f2739a3593d4f Issue-ID: OOM-2908 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/k8s-persistent-volume/molecule/ubuntu/molecule.yml25
l---------ansible/roles/k8s-persistent-volume/molecule/ubuntu/vars.yml1
-rw-r--r--ansible/roles/k8s-persistent-volume/tasks/main.yml1
3 files changed, 27 insertions, 0 deletions
diff --git a/ansible/roles/k8s-persistent-volume/molecule/ubuntu/molecule.yml b/ansible/roles/k8s-persistent-volume/molecule/ubuntu/molecule.yml
new file mode 100644
index 00000000..7eed8df2
--- /dev/null
+++ b/ansible/roles/k8s-persistent-volume/molecule/ubuntu/molecule.yml
@@ -0,0 +1,25 @@
+---
+dependency:
+ name: galaxy
+driver:
+ name: docker
+lint: |
+ set -e
+ yamllint .
+ ansible-lint .
+ flake8
+platforms:
+ - name: infrastructure-ubuntu-k8s-persistent-volume
+ image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
+ pre_build_image: true
+ groups:
+ - infrastructure
+provisioner:
+ name: ansible
+ env:
+ ANSIBLE_ROLES_PATH: ../../../../test/roles
+ ANSIBLE_LIBRARY: ../../../../library
+ playbooks:
+ converge: ../default/converge.yml
+verifier:
+ name: testinfra
diff --git a/ansible/roles/k8s-persistent-volume/molecule/ubuntu/vars.yml b/ansible/roles/k8s-persistent-volume/molecule/ubuntu/vars.yml
new file mode 120000
index 00000000..8be219f6
--- /dev/null
+++ b/ansible/roles/k8s-persistent-volume/molecule/ubuntu/vars.yml
@@ -0,0 +1 @@
+../default/vars.yml \ No newline at end of file
diff --git a/ansible/roles/k8s-persistent-volume/tasks/main.yml b/ansible/roles/k8s-persistent-volume/tasks/main.yml
index 8428857f..02fbbb26 100644
--- a/ansible/roles/k8s-persistent-volume/tasks/main.yml
+++ b/ansible/roles/k8s-persistent-volume/tasks/main.yml
@@ -3,6 +3,7 @@
package:
name: 'python2-openshift'
state: present
+ when: ansible_os_family == 'RedHat'
- name: Create k8s persistent volumes
community.kubernetes.k8s: