diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2022-01-05 12:50:04 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2022-01-05 13:31:46 +0100 |
commit | 292c95718c76b1eafb89e136e5425a31e2082fbe (patch) | |
tree | 7c3d126d90286102913db4acc04ec41e4754a7ff /ansible/roles | |
parent | ecdeb57b0dd8cdccd08dd7d93d0609e2fd5762f1 (diff) |
[MOLECULE] Add 'ubuntu' scenario for 'kube-prometheus-stack' role
Change-Id: I40ba8c39ad8530168672fad1134e26226d18b735
Issue-ID: OOM-2908
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles')
-rw-r--r-- | ansible/roles/kube-prometheus-stack/molecule/default/Dockerfile.j2 | 14 | ||||
-rw-r--r-- | ansible/roles/kube-prometheus-stack/molecule/ubuntu/molecule.yml | 32 |
2 files changed, 32 insertions, 14 deletions
diff --git a/ansible/roles/kube-prometheus-stack/molecule/default/Dockerfile.j2 b/ansible/roles/kube-prometheus-stack/molecule/default/Dockerfile.j2 deleted file mode 100644 index e6aa95d3..00000000 --- a/ansible/roles/kube-prometheus-stack/molecule/default/Dockerfile.j2 +++ /dev/null @@ -1,14 +0,0 @@ -# Molecule managed - -{% if item.registry is defined %} -FROM {{ item.registry.url }}/{{ item.image }} -{% else %} -FROM {{ item.image }} -{% endif %} - -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ - elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ - elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi diff --git a/ansible/roles/kube-prometheus-stack/molecule/ubuntu/molecule.yml b/ansible/roles/kube-prometheus-stack/molecule/ubuntu/molecule.yml new file mode 100644 index 00000000..68a66374 --- /dev/null +++ b/ansible/roles/kube-prometheus-stack/molecule/ubuntu/molecule.yml @@ -0,0 +1,32 @@ +--- +dependency: + name: galaxy +driver: + name: docker +lint: | + set -e + yamllint . + ansible-lint . + flake8 +platforms: + - name: infrastructure-ubuntu-kube-prometheus-stack + image: ubuntu:18.04 + groups: + - infrastructure +provisioner: + name: ansible + env: + ANSIBLE_ROLES_PATH: ../../../../test/roles + ANSIBLE_LIBRARY: ../../../../library + inventory: + group_vars: + all: + app_name: onap + app_data_path: "/opt/{{ app_name }}" + nfs_mount_path: "/dockerdata-nfs" + playbooks: + prepare: ../default/prepare.yml + converge: ../default/converge.yml +verifier: + name: testinfra + directory: ../default/tests |