diff --git a/.config/molecule/Dockerfile b/.config/molecule/Dockerfile new file mode 100644 index 0000000..5986f3b --- /dev/null +++ b/.config/molecule/Dockerfile @@ -0,0 +1,35 @@ +# Molecule managed +# Copyright 2021 Red Hat, Inc. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +FROM {{ item.image }} +{% endif %} + +RUN dnf makecache && dnf install -y sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} +# TODO(gchamoul): find a better to get always the latest version of those rpms +# below from the centos mirror +RUN dnf install -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm +RUN dnf install -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm && dnf install -y epel-release && dnf clean all + +{% for pkg in item.easy_install | default([]) %} +# install pip for centos where there is no python-pip rpm in default repos +RUN easy_install {{ pkg }} +{% endfor %} + +CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/.config/molecule/config.yml b/.config/molecule/config.yml new file mode 100644 index 0000000..592bae6 --- /dev/null +++ b/.config/molecule/config.yml @@ -0,0 +1,70 @@ +--- +# validations-common uses a shared molecule configuration file to avoid +# repetition. That configuration file is located at the repository level +# ({REPO}/.config/molecule/config.yml) and defines all the default values for +# all the molecule.yml files across all the roles. By default, the role-addition +# process will produce an empty molecule.yml inheriting this config.yml file. +# +# Any key defined in the role molecule.yml file will override values from this +# config.yml file. +# +# IMPORTANT: if you want to override the default values set here in this file, +# you will have to redefine them completely in your molecule.yml (at the role +# level) and add your extra configuration! +# +# For instance, if you need to add an extra package in your ubi8 container, you +# will have to add the entire "platforms" key into your molecule.yml file and +# add your package name in the pkg_extras key. +# +# No merge will happen between your molecule.yml and this config.yml +# files. That's why you will have to redefine them completely. + +driver: + name: podman + +log: true + +platforms: + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com + dockerfile: Dockerfile + pkg_extras: python*-setuptools python*-pyyaml + volumes: + - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro + privileged: true + environment: &env + http_proxy: "{{ lookup('env', 'http_proxy') }}" + https_proxy: "{{ lookup('env', 'https_proxy') }}" + ulimits: &ulimit + - host + +provisioner: + name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 + log: true + options: + vvv: true + env: + ANSIBLE_STDOUT_CALLBACK: yaml + ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" + +scenario: + test_sequence: + - destroy + - create + - prepare + - converge + - verify + - destroy + +verifier: + name: testinfra diff --git a/playbooks/molecule/pre.yml b/playbooks/molecule/pre.yml index 51d0415..4579086 100644 --- a/playbooks/molecule/pre.yml +++ b/playbooks/molecule/pre.yml @@ -87,24 +87,5 @@ * hard nproc 4096 dest: /etc/security/limits.d/containers.conf - - name: Install epel-release - package: - name: epel-release - state: present - - - name: Be sure to enable epel repo - become: true - command: >- - dnf config-manager --set-enabled epel - args: - warn: false - - - name: Copy repos directory to opt workspace - copy: - src: /etc/yum.repos.d - dest: /opt/ - remote_src: true - mode: "0777" - - name: Reset ssh connection meta: reset_connection diff --git a/tox.ini b/tox.ini index 37375b6..b4501dd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,9 @@ [tox] minversion = 3.2.0 -envlist = linters,docs,py,molecule +envlist = linters,docs,py skipdist = True requires = - tox-ansible >= 1.0.5 + tox-ansible >= 1.4.0 # Automatic envs (pyXX) will only use the python version appropriate to that # env and ignore basepython inherited from [testenv] if we set @@ -150,5 +150,6 @@ ignore = D001 [ansible] description = Used as base for all tox-ansible environments +scenario_format = $parent-$nondefault_name molecule_opts = --debug diff --git a/validations_common/roles/advanced_format_512e_support/molecule/default/Dockerfile b/validations_common/roles/advanced_format_512e_support/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/advanced_format_512e_support/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/advanced_format_512e_support/molecule/default/Dockerfile b/validations_common/roles/advanced_format_512e_support/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/advanced_format_512e_support/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/advanced_format_512e_support/molecule/default/molecule.yml b/validations_common/roles/advanced_format_512e_support/molecule/default/molecule.yml index 89d8cf5..76b1664 100644 --- a/validations_common/roles/advanced_format_512e_support/molecule/default/molecule.yml +++ b/validations_common/roles/advanced_format_512e_support/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools python*-pyyaml - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/check_cpu/molecule/default/Dockerfile b/validations_common/roles/check_cpu/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/check_cpu/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/check_cpu/molecule/default/Dockerfile b/validations_common/roles/check_cpu/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/check_cpu/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/check_cpu/molecule/default/molecule.yml b/validations_common/roles/check_cpu/molecule/default/molecule.yml index e7f7da5..76b1664 100644 --- a/validations_common/roles/check_cpu/molecule/default/molecule.yml +++ b/validations_common/roles/check_cpu/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/check_disk_space/molecule/default/Dockerfile b/validations_common/roles/check_disk_space/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/check_disk_space/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/check_disk_space/molecule/default/Dockerfile b/validations_common/roles/check_disk_space/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/check_disk_space/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/check_disk_space/molecule/default/molecule.yml b/validations_common/roles/check_disk_space/molecule/default/molecule.yml index e7f7da5..76b1664 100644 --- a/validations_common/roles/check_disk_space/molecule/default/molecule.yml +++ b/validations_common/roles/check_disk_space/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/check_latest_packages_version/molecule/default/Dockerfile b/validations_common/roles/check_latest_packages_version/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/check_latest_packages_version/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/check_latest_packages_version/molecule/default/Dockerfile b/validations_common/roles/check_latest_packages_version/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/check_latest_packages_version/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/check_latest_packages_version/molecule/default/molecule.yml b/validations_common/roles/check_latest_packages_version/molecule/default/molecule.yml index 89d8cf5..76b1664 100644 --- a/validations_common/roles/check_latest_packages_version/molecule/default/molecule.yml +++ b/validations_common/roles/check_latest_packages_version/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools python*-pyyaml - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/check_ram/molecule/default/Dockerfile b/validations_common/roles/check_ram/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/check_ram/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/check_ram/molecule/default/Dockerfile b/validations_common/roles/check_ram/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/check_ram/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/check_ram/molecule/default/molecule.yml b/validations_common/roles/check_ram/molecule/default/molecule.yml index e7f7da5..76b1664 100644 --- a/validations_common/roles/check_ram/molecule/default/molecule.yml +++ b/validations_common/roles/check_ram/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/check_selinux_mode/molecule/default/Dockerfile b/validations_common/roles/check_selinux_mode/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/check_selinux_mode/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/check_selinux_mode/molecule/default/Dockerfile b/validations_common/roles/check_selinux_mode/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/check_selinux_mode/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/check_selinux_mode/molecule/default/molecule.yml b/validations_common/roles/check_selinux_mode/molecule/default/molecule.yml index e7f7da5..76b1664 100644 --- a/validations_common/roles/check_selinux_mode/molecule/default/molecule.yml +++ b/validations_common/roles/check_selinux_mode/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/dns/molecule/default/Dockerfile b/validations_common/roles/dns/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/dns/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/dns/molecule/default/Dockerfile b/validations_common/roles/dns/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/dns/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/dns/molecule/default/molecule.yml b/validations_common/roles/dns/molecule/default/molecule.yml index e7f7da5..76b1664 100644 --- a/validations_common/roles/dns/molecule/default/molecule.yml +++ b/validations_common/roles/dns/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/haproxy/molecule/default/Dockerfile b/validations_common/roles/haproxy/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/haproxy/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/haproxy/molecule/default/Dockerfile b/validations_common/roles/haproxy/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/haproxy/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/haproxy/molecule/default/molecule.yml b/validations_common/roles/haproxy/molecule/default/molecule.yml index df0f767..76b1664 100644 --- a/validations_common/roles/haproxy/molecule/default/molecule.yml +++ b/validations_common/roles/haproxy/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*-setuptools haproxy python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/ntp/molecule/default/Dockerfile b/validations_common/roles/ntp/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/ntp/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/ntp/molecule/default/Dockerfile b/validations_common/roles/ntp/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/ntp/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/ntp/molecule/default/molecule.yml b/validations_common/roles/ntp/molecule/default/molecule.yml index 74d3d7a..76b1664 100644 --- a/validations_common/roles/ntp/molecule/default/molecule.yml +++ b/validations_common/roles/ntp/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools python*-enum34 ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/service_status/molecule/default/Dockerfile b/validations_common/roles/service_status/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/service_status/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/service_status/molecule/default/Dockerfile b/validations_common/roles/service_status/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/service_status/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/service_status/molecule/default/molecule.yml b/validations_common/roles/service_status/molecule/default/molecule.yml index a0e451f..ef0f396 100644 --- a/validations_common/roles/service_status/molecule/default/molecule.yml +++ b/validations_common/roles/service_status/molecule/default/molecule.yml @@ -1,9 +1,10 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman -log: true - platforms: - name: ubi8 hostname: ubi8 @@ -15,36 +16,9 @@ platforms: pkg_extras: python*-setuptools python*-pyyaml volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw privileged: true environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" https_proxy: "{{ lookup('env', 'https_proxy') }}" ulimits: &ulimit - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/service_status/molecule/docker/Dockerfile b/validations_common/roles/service_status/molecule/docker/Dockerfile deleted file mode 100644 index 1b91a0e..0000000 --- a/validations_common/roles/service_status/molecule/docker/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/service_status/molecule/docker/Dockerfile b/validations_common/roles/service_status/molecule/docker/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/service_status/molecule/docker/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/service_status/molecule/docker/molecule.yml b/validations_common/roles/service_status/molecule/docker/molecule.yml index d9d17bf..a9d97cb 100644 --- a/validations_common/roles/service_status/molecule/docker/molecule.yml +++ b/validations_common/roles/service_status/molecule/docker/molecule.yml @@ -1,9 +1,10 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: docker -log: true - platforms: - name: ubi8 hostname: ubi8 @@ -19,33 +20,6 @@ platforms: - /var/run/docker.sock:/var/run/docker.sock - /sys/fs/cgroup:/sys/fs/cgroup:ro - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw environment: &env http_proxy: "{{ lookup('env', 'http_proxy') }}" https_proxy: "{{ lookup('env', 'https_proxy') }}" - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/service_status/molecule/podman/Dockerfile b/validations_common/roles/service_status/molecule/podman/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/service_status/molecule/podman/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/service_status/molecule/podman/Dockerfile b/validations_common/roles/service_status/molecule/podman/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/service_status/molecule/podman/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/service_status/molecule/podman/molecule.yml b/validations_common/roles/service_status/molecule/podman/molecule.yml index d6d397b..76b1664 100644 --- a/validations_common/roles/service_status/molecule/podman/molecule.yml +++ b/validations_common/roles/service_status/molecule/podman/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*-setuptools python*-pyyaml - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/service_status/molecule/systemd/Dockerfile b/validations_common/roles/service_status/molecule/systemd/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/service_status/molecule/systemd/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/service_status/molecule/systemd/Dockerfile b/validations_common/roles/service_status/molecule/systemd/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/service_status/molecule/systemd/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/service_status/molecule/systemd/molecule.yml b/validations_common/roles/service_status/molecule/systemd/molecule.yml index 0a04ebf..edf0acd 100644 --- a/validations_common/roles/service_status/molecule/systemd/molecule.yml +++ b/validations_common/roles/service_status/molecule/systemd/molecule.yml @@ -1,9 +1,10 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman -log: true - platforms: - name: ubi8 hostname: ubi8 @@ -14,8 +15,6 @@ platforms: pkg_extras: python*-setuptools python*-pyyaml volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw privileged: true command: /sbin/init environment: &env @@ -23,28 +22,3 @@ platforms: https_proxy: "{{ lookup('env', 'https_proxy') }}" ulimits: &ulimit - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/validate_selinux/molecule/default/Dockerfile b/validations_common/roles/validate_selinux/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/validate_selinux/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/validate_selinux/molecule/default/Dockerfile b/validations_common/roles/validate_selinux/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/validate_selinux/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/validate_selinux/molecule/default/molecule.yml b/validations_common/roles/validate_selinux/molecule/default/molecule.yml index 7d47e5a..76b1664 100644 --- a/validations_common/roles/validate_selinux/molecule/default/molecule.yml +++ b/validations_common/roles/validate_selinux/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra diff --git a/validations_common/roles/xfs_check_ftype/molecule/default/Dockerfile b/validations_common/roles/xfs_check_ftype/molecule/default/Dockerfile deleted file mode 100644 index e0534b4..0000000 --- a/validations_common/roles/xfs_check_ftype/molecule/default/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Molecule managed -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -{% 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 sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && 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 {{ item.pkg_extras | default('') }} && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi - -{% for pkg in item.easy_install | default([]) %} -# install pip for centos where there is no python-pip rpm in default repos -RUN easy_install {{ pkg }} -{% endfor %} - - -CMD ["sh", "-c", "while true; do sleep 10000; done"] diff --git a/validations_common/roles/xfs_check_ftype/molecule/default/Dockerfile b/validations_common/roles/xfs_check_ftype/molecule/default/Dockerfile new file mode 120000 index 0000000..d6448a1 --- /dev/null +++ b/validations_common/roles/xfs_check_ftype/molecule/default/Dockerfile @@ -0,0 +1 @@ +../../../../../.config/molecule/Dockerfile \ No newline at end of file diff --git a/validations_common/roles/xfs_check_ftype/molecule/default/molecule.yml b/validations_common/roles/xfs_check_ftype/molecule/default/molecule.yml index e688be1..76b1664 100644 --- a/validations_common/roles/xfs_check_ftype/molecule/default/molecule.yml +++ b/validations_common/roles/xfs_check_ftype/molecule/default/molecule.yml @@ -1,49 +1,6 @@ --- +# inherits tripleo-validations/.config/molecule/config.yml +# To override default values, please take a look at the config.yml. + driver: name: podman - -log: true - -platforms: - - name: ubi8 - hostname: ubi8 - image: ubi8/ubi-init - registry: - url: registry.access.redhat.com - dockerfile: Dockerfile - pkg_extras: python*setuptools python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - - /etc/pki/rpm-gpg:/etc/pki/rpm-gpg - - /opt/yum.repos.d:/etc/yum.repos.d:rw - privileged: true - environment: &env - http_proxy: "{{ lookup('env', 'http_proxy') }}" - https_proxy: "{{ lookup('env', 'https_proxy') }}" - ulimits: &ulimit - - host - -provisioner: - name: ansible - inventory: - hosts: - all: - hosts: - ubi8: - ansible_python_interpreter: /usr/bin/python3 - log: true - env: - ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" - -scenario: - test_sequence: - - destroy - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra