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 12:55:16 +0100 |
commit | b3bb1cd651730773f2c4142335d68a9e9b11103c (patch) | |
tree | 9d65456c8bb2f78356d49dd3f60e149a576e7b6b | |
parent | c4a84befb5832fe61f94f489c7edacf115eed615 (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>
-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 |