From 5bf1427b43132259cd8e37d4b9c4479af9ece958 Mon Sep 17 00:00:00 2001 From: "Gael Chamoulaud (Strider)" Date: Thu, 8 Oct 2020 11:29:58 +0200 Subject: [PATCH] Use the UBI8 image for testing This change converts our use of CentOS7/88 to UBI8, which should provide a better test environment which will match that of production for future releases of TripleO. While this image change will better match production clouds thanks in large part to TCIB, it will also remove our use of docker.io (dockerhub) which fraught with peril due to the ongoing API rate limits saga. Change-Id: I69f3400568d865c1f3505913077ecd7fe36d7d43 Signed-off-by: Gael Chamoulaud (Strider) --- .../default/{Dockerfile.j2 => Dockerfile} | 0 _skeleton_role_/molecule/default/molecule.yml | 34 +++--- _skeleton_role_/molecule/default/verify.yml | 15 --- ansible-test-env.rc | 7 +- bindep.txt | 3 + ci/playbooks/pre.yml | 79 +++++++++++++- ci/playbooks/run-local.yml | 5 +- doc/source/readme.rst | 103 ++++++++++++++++++ .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 33 +++--- .../ceph-ansible-installed/molecule.yml | 36 +++--- .../ceph-ansible-installed/prepare.yml | 2 +- roles/ceph/molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 21 +++- .../molecule/default/Dockerfile | 2 +- .../molecule/default/molecule.yml | 34 +++--- .../molecule/default/molecule.yml | 26 +++-- .../molecule/rhsm_mismatch/molecule.yml | 28 +++-- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../molecule/default/prepare.yml | 5 + .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../image_serve/molecule/default/molecule.yml | 39 +++---- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../node_disks/molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../node_health/molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../nova_status/molecule/default/molecule.yml | 34 +++--- .../nova_svirt/molecule/default/molecule.yml | 34 +++--- roles/nova_svirt/molecule/default/prepare.yml | 5 + .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 roles/repos/molecule/default/molecule.yml | 33 +++--- roles/repos/molecule/default/verify.yml | 15 --- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 33 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 33 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 38 +++---- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 34 +++--- .../default/{Dockerfile.j2 => Dockerfile} | 0 .../molecule/default/molecule.yml | 38 +++---- .../{Dockerfile.j2 => Dockerfile} | 0 .../non-persistent-token-format/molecule.yml | 38 +++---- scripts/run-local-test | 5 +- 91 files changed, 941 insertions(+), 755 deletions(-) rename _skeleton_role_/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) delete mode 100644 _skeleton_role_/molecule/default/verify.yml rename roles/ceilometerdb_size/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/check_kernel_version/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/collect_flavors_and_verify_profiles/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/container_status/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/controller_token/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/controller_ulimits/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/ctlplane_ip_range/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/dhcp_validations/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/healthcheck_service_status/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/image_serve/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/ironic_boot_configuration/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/mysql_open_files_limit/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/network_environment/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/neutron_sanity_check/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/node_disks/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/node_health/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/nova_event_callback/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/nova_status/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/openshift_on_openstack/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/openstack_endpoints/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/ovs_dpdk_pmd/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/pacemaker_status/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/package_version/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/rabbitmq_limits/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/repos/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) delete mode 100644 roles/repos/molecule/default/verify.yml rename roles/stack_health/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/stonith_exists/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/switch_vlans/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/tls_everywhere/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/undercloud_debug/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/undercloud_disk_space/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/undercloud_heat_purge_deleted/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/undercloud_process_count/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/undercloud_tokenflush/molecule/default/{Dockerfile.j2 => Dockerfile} (100%) rename roles/undercloud_tokenflush/molecule/non-persistent-token-format/{Dockerfile.j2 => Dockerfile} (100%) diff --git a/_skeleton_role_/molecule/default/Dockerfile.j2 b/_skeleton_role_/molecule/default/Dockerfile similarity index 100% rename from _skeleton_role_/molecule/default/Dockerfile.j2 rename to _skeleton_role_/molecule/default/Dockerfile diff --git a/_skeleton_role_/molecule/default/molecule.yml b/_skeleton_role_/molecule/default/molecule.yml index 7036a0887..97c395a60 100644 --- a/_skeleton_role_/molecule/default/molecule.yml +++ b/_skeleton_role_/molecule/default/molecule.yml @@ -5,38 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com dockerfile: Dockerfile - pkg_extras: python-setuptools + pkg_extras: python*-setuptools + privileged: true volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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') }}" ulimits: &ulimit - host - - name: centos8 - hostname: centos8 - image: centos:8 - dockerfile: Dockerfile - pkg_extras: python*-setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: &ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/_skeleton_role_/molecule/default/verify.yml b/_skeleton_role_/molecule/default/verify.yml deleted file mode 100644 index ede65b54e..000000000 --- a/_skeleton_role_/molecule/default/verify.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# Copyright 2020 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. diff --git a/ansible-test-env.rc b/ansible-test-env.rc index 7c78da872..50b948308 100644 --- a/ansible-test-env.rc +++ b/ansible-test-env.rc @@ -1,9 +1,14 @@ export TRIPLEO_VALIDATIONS_WORKPATH="$(dirname $(readlink -f ${BASH_SOURCE[0]}))" export ANSIBLE_STDOUT_CALLBACK=debug export ANSIBLE_CALLBACK_PLUGINS="${TRIPLEO_VALIDATIONS_WORKPATH}/callback_plugins" -export ANSIBLE_LIBRARY="${TRIPLEO_VALIDATIONS_WORKPATH}/library" + +ANSIBLE_LIBRARY="${TRIPLEO_VALIDATIONS_WORKPATH}/library" +export ANSIBLE_LIBRARY="${ANSIBLE_LIBRARY}:${TRIPLEO_VALIDATIONS_WORKPATH}/roles/roles.galaxy/validations-common/validations_common/library" export ANSIBLE_LOOKUP_PLUGINS="${TRIPLEO_VALIDATIONS_WORKPATH}/lookup_plugins" + export ANSIBLE_ROLES_PATH="${TRIPLEO_VALIDATIONS_WORKPATH}/roles" +export ANSIBLE_ROLES_PATH="${ANSIBLE_ROLES_PATH}:${TRIPLEO_VALIDATIONS_WORKPATH}/roles/roles.galaxy/tripleo-ansible/tripleo_ansible/roles" + export ANSIBLE_INVENTORY="${TRIPLEO_VALIDATIONS_WORKPATH}/tests/hosts.ini" export ANSIBLE_RETRY_FILES_ENABLED="0" export ANSIBLE_LOAD_CALLBACK_PLUGINS="1" diff --git a/bindep.txt b/bindep.txt index d40e707af..6e77a198c 100644 --- a/bindep.txt +++ b/bindep.txt @@ -25,6 +25,9 @@ libxslt-devel [platform:rpm] libxslt1-dev [platform:dpkg] libxslt-dev [platform:apk] +# RH Mechanisms +python-rhsm-certificates [platform: redhat] + podman [platform:rpm] python-devel [platform:rpm !platform:rhel-8 !platform:centos-8] python3-devel [platform:rpm !platform:rhel-7 !platform:centos-7] diff --git a/ci/playbooks/pre.yml b/ci/playbooks/pre.yml index 569ff155e..20b2a98da 100644 --- a/ci/playbooks/pre.yml +++ b/ci/playbooks/pre.yml @@ -1,11 +1,19 @@ --- - hosts: all pre_tasks: + - name: Set project path fact + set_fact: + tripleo_validations_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-validations'].src_dir }}" + - name: Ensure output dirs file: path: "{{ ansible_user_dir }}/zuul-output/logs" state: directory + - name: Ensure pip is available + include_role: + name: ensure-pip + - name: Ensure virtualenv is available include_role: name: ensure-virtualenv @@ -14,26 +22,91 @@ pip: name: "bindep" virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_site_packages: true - name: Run bindep shell: |- . {{ ansible_user_dir }}/test-python/bin/activate - {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/scripts/bindep-install + {{ tripleo_validations_project_path }}/scripts/bindep-install become: true changed_when: false - name: Setup test-python pip: - requirements: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/molecule-requirements.txt" + requirements: "{{ tripleo_validations_project_path }}/molecule-requirements.txt" virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_site_packages: true + - name: Display test-python virtualenv package versions + shell: |- + . {{ ansible_user_dir }}/test-python/bin/activate + pip freeze + + - name: Basic ci setup + become: true + block: + - name: Ensure ci directories + file: + path: "/etc/ci" + state: "directory" + + - name: Ensure ci mirror file + file: + path: "/etc/ci/mirror_info.sh" + state: "touch" + + - name: Set an appropriate fs.file-max + sysctl: + name: fs.file-max + value: 2048000 + sysctl_set: true + state: present + reload: true + + - name: Set container_manage_cgroup boolean + seboolean: + name: container_manage_cgroup + state: true + persistent: true + failed_when: false + + - name: Create limits file for containers + copy: + content: | + * soft nofile 102400 + * hard nofile 204800 + * soft nproc 2048 + * 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 tasks: - name: Get necessary git repos git: repo: https://opendev.org/openstack/{{ item }} - dest: "{{ ansible_user_dir}}/{{ zuul.project.src_dir }}/roles/roles.galaxy/{{ item }}" + dest: "{{ tripleo_validations_project_path }}/roles/roles.galaxy/{{ item }}" version: master force: true with_items: diff --git a/ci/playbooks/run-local.yml b/ci/playbooks/run-local.yml index cd0f83e27..af5295db3 100644 --- a/ci/playbooks/run-local.yml +++ b/ci/playbooks/run-local.yml @@ -4,8 +4,9 @@ - name: set basic zuul fact set_fact: zuul: - project: - src_dir: "{{ tripleo_src }}" + projects: + "opendev.org/openstack/tripleo-validations": + src_dir: "{{ tripleo_src }}" ansible_connection: ssh - import_playbook: pre.yml diff --git a/doc/source/readme.rst b/doc/source/readme.rst index fc64d045e..8ee8a6f10 100644 --- a/doc/source/readme.rst +++ b/doc/source/readme.rst @@ -513,3 +513,106 @@ Finally add a role documentation file at a title, a literal include of the defaults yaml and a literal include of the molecule playbook, or playbooks, used to test the role, which is noted as an "example" playbook. + +Local testing of new roles +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Local testing of new roles can be done in any number of ways, however, +the easiest way is via the script `run-local-test` on a *CentOS 8* machaine. +This script will setup the local work environment to execute tests mimicking +what Zuul does. + +.. warning:: + + This script makes the assumption the executing user has the + ability to escalate privileges and will modify the local system. + +To use this script execute the following command. + +.. code-block:: console + + $ ./scripts/run-local-test ${NEWROLENAME} + +When using the `run-local-test` script, the TRIPLEO_JOB_ANSIBLE_ARGS +environment variable can be used to pass arbitrary Ansible arguments. +For example, the following shows how to use `--skip-tags` when testing +a role with tags. + +.. code-block:: console + + $ export TRIPLEO_JOB_ANSIBLE_ARGS="--skip-tags tag_one,tag_two" + $ ./scripts/run-local-test ${ROLENAME} + +Role based testing with molecule can be executed directly from within +the role directory. + +.. note:: + + All tests require Podman for container based testing. If Podman + is not available on the local workstation it will need to be + installed prior to executing most molecule based tests. + + +.. note:: + + The script `bindep-install`, in the **scripts** path, is + available and will install all system dependencies. + + +.. note:: + + Some roles depend on some packages which are available only through the EPEL + repositories. So, please ensure you have installed them on your CentOS 8 host + before running molecule tests. + + +Before running basic molecule tests, it is recommended to install all +of the python dependencies in a virtual environment. + +.. code-block:: console + + $ python -m virtualenv --system-site-packages "${HOME}/test-python" + $ ${HOME}/test-python/bin/pip install -r requirements.txt \ + -r test-requirements.txt \ + -r molecule-requirements.txt + $ source ${HOME}/test-python/bin/activate + + +Now, it is important to install validations-common and tripleo-ansible as +dependencies. + +.. code-block:: console + + $ cd tripleo-validations/ + $ for REPO in validations-common tripleo-ansible; do + git clone https://opendev.org/openstack/${REPO} roles/roles.galaxy/${REPO} + done + + +To run a basic molecule test, simply source the `ansible-test-env.rc` +file from the project root, and then execute the following commands. + +.. code-block:: console + + (test-python) $ cd roles/${NEWROLENAME}/ + (test-python) $ molecule test --all + + +If a role has more than one scenario, a specific scenario can be +specified on the command line. Running specific scenarios will +help provide developer feedback faster. To pass-in a scenario use +the `--scenario-name` flag with the name of the desired scenario. + +.. code-block:: console + + (test-python) $ cd tripleo-validations/roles/${NEWROLENAME}/ + (test-python) $ molecule test --scenario-name ${EXTRA_SCENARIO_NAME} + + +When debugging molecule tests its sometimes useful to use the +`--debug` flag. This flag will provide extra verbose output about +test being executed and running the environment. + +.. code-block:: console + + (test-python) $ molecule --debug test diff --git a/roles/ceilometerdb_size/molecule/default/Dockerfile.j2 b/roles/ceilometerdb_size/molecule/default/Dockerfile similarity index 100% rename from roles/ceilometerdb_size/molecule/default/Dockerfile.j2 rename to roles/ceilometerdb_size/molecule/default/Dockerfile diff --git a/roles/ceilometerdb_size/molecule/default/molecule.yml b/roles/ceilometerdb_size/molecule/default/molecule.yml index 603ec3b53..d4dfe7fd9 100644 --- a/roles/ceilometerdb_size/molecule/default/molecule.yml +++ b/roles/ceilometerdb_size/molecule/default/molecule.yml @@ -5,36 +5,35 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com + dockerfile: Dockerfile + pkg_extras: python*-setuptools ruby python*-pyyaml volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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') }}" ulimits: &ulimit - host - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/ceph/molecule/ceph-ansible-installed/molecule.yml b/roles/ceph/molecule/ceph-ansible-installed/molecule.yml index 136ea19d4..8d66856c6 100644 --- a/roles/ceph/molecule/ceph-ansible-installed/molecule.yml +++ b/roles/ceph/molecule/ceph-ansible-installed/molecule.yml @@ -5,38 +5,38 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com dockerfile: Dockerfile - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + pkg_extras: python*-setuptools python*-pyyaml volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - dockerfile: Dockerfile - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 + vars: + ansible_user: root log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: name: ceph-ansible-installed diff --git a/roles/ceph/molecule/ceph-ansible-installed/prepare.yml b/roles/ceph/molecule/ceph-ansible-installed/prepare.yml index 708079f42..c2da0de6e 100644 --- a/roles/ceph/molecule/ceph-ansible-installed/prepare.yml +++ b/roles/ceph/molecule/ceph-ansible-installed/prepare.yml @@ -24,6 +24,6 @@ yum_repository: name: tripleo-centos-ceph-nautilus description: ceph-nautilus repository - baseurl: http://mirror.centos.org/centos/7/storage/x86_64/ceph-nautilus/ + baseurl: http://mirror.centos.org/centos/8/storage/x86_64/ceph-nautilus/ gpgcheck: false enabled: true diff --git a/roles/ceph/molecule/default/molecule.yml b/roles/ceph/molecule/default/molecule.yml index 54d9f3ee7..d3c8fa2e1 100644 --- a/roles/ceph/molecule/default/molecule.yml +++ b/roles/ceph/molecule/default/molecule.yml @@ -5,32 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML - easy_install: - - pip + - 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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/check_kernel_version/molecule/default/Dockerfile.j2 b/roles/check_kernel_version/molecule/default/Dockerfile similarity index 100% rename from roles/check_kernel_version/molecule/default/Dockerfile.j2 rename to roles/check_kernel_version/molecule/default/Dockerfile diff --git a/roles/check_kernel_version/molecule/default/molecule.yml b/roles/check_kernel_version/molecule/default/molecule.yml index cecb4f90e..d3c8fa2e1 100644 --- a/roles/check_kernel_version/molecule/default/molecule.yml +++ b/roles/check_kernel_version/molecule/default/molecule.yml @@ -5,14 +5,19 @@ driver: log: true platforms: - - name: centos8 - hostname: centos8 - image: centos:8 + - 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 - environment: + - /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 @@ -20,10 +25,16 @@ platforms: provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/check_network_gateway/molecule/default/Dockerfile b/roles/check_network_gateway/molecule/default/Dockerfile index e0534b4d1..c930ca9cb 100644 --- a/roles/check_network_gateway/molecule/default/Dockerfile +++ b/roles/check_network_gateway/molecule/default/Dockerfile @@ -22,7 +22,7 @@ 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 dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm {{ 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('') }}; \ diff --git a/roles/check_network_gateway/molecule/default/molecule.yml b/roles/check_network_gateway/molecule/default/molecule.yml index 6e07d5ae6..89ed56d61 100644 --- a/roles/check_network_gateway/molecule/default/molecule.yml +++ b/roles/check_network_gateway/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr epel-release ruby PyYAML + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com + dockerfile: Dockerfile + pkg_extras: python*setuptools python*-PyYAML iputils volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby epel-release iputils python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/check_rhsm_version/molecule/default/molecule.yml b/roles/check_rhsm_version/molecule/default/molecule.yml index a891e8302..fae7f3419 100644 --- a/roles/check_rhsm_version/molecule/default/molecule.yml +++ b/roles/check_rhsm_version/molecule/default/molecule.yml @@ -5,25 +5,37 @@ driver: log: true platforms: - - name: centos8 - hostname: centos8 - image: centos:8 + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com dockerfile: Dockerfile + privileged: true pkg_extras: python*-setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: + - /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') }}" + ulimits: &ulimit + - host provisioner: name: ansible - options: - vvv: true + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/check_rhsm_version/molecule/rhsm_mismatch/molecule.yml b/roles/check_rhsm_version/molecule/rhsm_mismatch/molecule.yml index a891e8302..6ffbbd33b 100644 --- a/roles/check_rhsm_version/molecule/rhsm_mismatch/molecule.yml +++ b/roles/check_rhsm_version/molecule/rhsm_mismatch/molecule.yml @@ -5,25 +5,39 @@ driver: log: true platforms: - - name: centos8 - hostname: centos8 - image: centos:8 + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com dockerfile: Dockerfile + override_command: true + command: /sbin/init + privileged: true pkg_extras: python*-setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: + - /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') }}" + ulimits: &ulimit + - host provisioner: name: ansible - options: - vvv: true + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/collect_flavors_and_verify_profiles/molecule/default/Dockerfile.j2 b/roles/collect_flavors_and_verify_profiles/molecule/default/Dockerfile similarity index 100% rename from roles/collect_flavors_and_verify_profiles/molecule/default/Dockerfile.j2 rename to roles/collect_flavors_and_verify_profiles/molecule/default/Dockerfile diff --git a/roles/collect_flavors_and_verify_profiles/molecule/default/molecule.yml b/roles/collect_flavors_and_verify_profiles/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/collect_flavors_and_verify_profiles/molecule/default/molecule.yml +++ b/roles/collect_flavors_and_verify_profiles/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/container_status/molecule/default/Dockerfile.j2 b/roles/container_status/molecule/default/Dockerfile similarity index 100% rename from roles/container_status/molecule/default/Dockerfile.j2 rename to roles/container_status/molecule/default/Dockerfile diff --git a/roles/container_status/molecule/default/molecule.yml b/roles/container_status/molecule/default/molecule.yml index 353ae4681..d3c8fa2e1 100644 --- a/roles/container_status/molecule/default/molecule.yml +++ b/roles/container_status/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML - easy_install: - - pip + - 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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/controller_token/molecule/default/Dockerfile.j2 b/roles/controller_token/molecule/default/Dockerfile similarity index 100% rename from roles/controller_token/molecule/default/Dockerfile.j2 rename to roles/controller_token/molecule/default/Dockerfile diff --git a/roles/controller_token/molecule/default/molecule.yml b/roles/controller_token/molecule/default/molecule.yml index c61de261e..d6d397b26 100644 --- a/roles/controller_token/molecule/default/molecule.yml +++ b/roles/controller_token/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/controller_ulimits/molecule/default/Dockerfile.j2 b/roles/controller_ulimits/molecule/default/Dockerfile similarity index 100% rename from roles/controller_ulimits/molecule/default/Dockerfile.j2 rename to roles/controller_ulimits/molecule/default/Dockerfile diff --git a/roles/controller_ulimits/molecule/default/molecule.yml b/roles/controller_ulimits/molecule/default/molecule.yml index 9175bff1e..be46efd2f 100644 --- a/roles/controller_ulimits/molecule/default/molecule.yml +++ b/roles/controller_ulimits/molecule/default/molecule.yml @@ -4,14 +4,18 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools + - 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 - easy_install: - - pip + - /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') }}" @@ -19,22 +23,18 @@ platforms: - nofile=512:512 - nproc=512:512 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/ctlplane_ip_range/molecule/default/Dockerfile.j2 b/roles/ctlplane_ip_range/molecule/default/Dockerfile similarity index 100% rename from roles/ctlplane_ip_range/molecule/default/Dockerfile.j2 rename to roles/ctlplane_ip_range/molecule/default/Dockerfile diff --git a/roles/ctlplane_ip_range/molecule/default/molecule.yml b/roles/ctlplane_ip_range/molecule/default/molecule.yml index 29868826a..5f17a6a39 100644 --- a/roles/ctlplane_ip_range/molecule/default/molecule.yml +++ b/roles/ctlplane_ip_range/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com + dockerfile: Dockerfile + pkg_extras: python*-setuptools python*-pyyaml + privileged: true volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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') }}" ulimits: &ulimit - host - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby epel-release python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/ctlplane_ip_range/molecule/default/prepare.yml b/roles/ctlplane_ip_range/molecule/default/prepare.yml index 832276934..d2a5dd259 100644 --- a/roles/ctlplane_ip_range/molecule/default/prepare.yml +++ b/roles/ctlplane_ip_range/molecule/default/prepare.yml @@ -20,6 +20,11 @@ gather_facts: false tasks: + - name: install python netaddr library + package: + name: python*-netaddr + state: installed + - name: install hiera package: name: hiera diff --git a/roles/dhcp_validations/molecule/default/Dockerfile.j2 b/roles/dhcp_validations/molecule/default/Dockerfile similarity index 100% rename from roles/dhcp_validations/molecule/default/Dockerfile.j2 rename to roles/dhcp_validations/molecule/default/Dockerfile diff --git a/roles/dhcp_validations/molecule/default/molecule.yml b/roles/dhcp_validations/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/dhcp_validations/molecule/default/molecule.yml +++ b/roles/dhcp_validations/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/healthcheck_service_status/molecule/default/Dockerfile.j2 b/roles/healthcheck_service_status/molecule/default/Dockerfile similarity index 100% rename from roles/healthcheck_service_status/molecule/default/Dockerfile.j2 rename to roles/healthcheck_service_status/molecule/default/Dockerfile diff --git a/roles/healthcheck_service_status/molecule/default/molecule.yml b/roles/healthcheck_service_status/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/healthcheck_service_status/molecule/default/molecule.yml +++ b/roles/healthcheck_service_status/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/image_serve/molecule/default/Dockerfile.j2 b/roles/image_serve/molecule/default/Dockerfile similarity index 100% rename from roles/image_serve/molecule/default/Dockerfile.j2 rename to roles/image_serve/molecule/default/Dockerfile diff --git a/roles/image_serve/molecule/default/molecule.yml b/roles/image_serve/molecule/default/molecule.yml index b7f81d3c6..ce6e3380d 100644 --- a/roles/image_serve/molecule/default/molecule.yml +++ b/roles/image_serve/molecule/default/molecule.yml @@ -5,46 +5,41 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com etc_hosts: undercloud.ctlplane.mydomain.tld: "127.0.0.1" - image: centos:7 + dockerfile: Dockerfile override_command: true command: /sbin/init privileged: true - pkg_extras: python-setuptools python-enum34 python-netaddr epel-release ruby PyYAML + pkg_extras: python*-setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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') }}" ulimits: &ulimit - host - - name: centos8 - hostname: centos8 - etc_hosts: - undercloud.ctlplane.mydomain.tld: "127.0.0.1" - image: centos:8 - override_command: true - command: /sbin/init - privileged: true - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby epel-release python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_ROLES_PATH: ../../../../roles/roles.galaxy/tripleo-ansible/tripleo_ansible/roles + ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/ironic_boot_configuration/molecule/default/Dockerfile.j2 b/roles/ironic_boot_configuration/molecule/default/Dockerfile similarity index 100% rename from roles/ironic_boot_configuration/molecule/default/Dockerfile.j2 rename to roles/ironic_boot_configuration/molecule/default/Dockerfile diff --git a/roles/ironic_boot_configuration/molecule/default/molecule.yml b/roles/ironic_boot_configuration/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/ironic_boot_configuration/molecule/default/molecule.yml +++ b/roles/ironic_boot_configuration/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/mysql_open_files_limit/molecule/default/Dockerfile.j2 b/roles/mysql_open_files_limit/molecule/default/Dockerfile similarity index 100% rename from roles/mysql_open_files_limit/molecule/default/Dockerfile.j2 rename to roles/mysql_open_files_limit/molecule/default/Dockerfile diff --git a/roles/mysql_open_files_limit/molecule/default/molecule.yml b/roles/mysql_open_files_limit/molecule/default/molecule.yml index 353ae4681..d3c8fa2e1 100644 --- a/roles/mysql_open_files_limit/molecule/default/molecule.yml +++ b/roles/mysql_open_files_limit/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML - easy_install: - - pip + - 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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/network_environment/molecule/default/Dockerfile.j2 b/roles/network_environment/molecule/default/Dockerfile similarity index 100% rename from roles/network_environment/molecule/default/Dockerfile.j2 rename to roles/network_environment/molecule/default/Dockerfile diff --git a/roles/network_environment/molecule/default/molecule.yml b/roles/network_environment/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/network_environment/molecule/default/molecule.yml +++ b/roles/network_environment/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/neutron_sanity_check/molecule/default/Dockerfile.j2 b/roles/neutron_sanity_check/molecule/default/Dockerfile similarity index 100% rename from roles/neutron_sanity_check/molecule/default/Dockerfile.j2 rename to roles/neutron_sanity_check/molecule/default/Dockerfile diff --git a/roles/neutron_sanity_check/molecule/default/molecule.yml b/roles/neutron_sanity_check/molecule/default/molecule.yml index 353ae4681..d3c8fa2e1 100644 --- a/roles/neutron_sanity_check/molecule/default/molecule.yml +++ b/roles/neutron_sanity_check/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML - easy_install: - - pip + - 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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/node_disks/molecule/default/Dockerfile.j2 b/roles/node_disks/molecule/default/Dockerfile similarity index 100% rename from roles/node_disks/molecule/default/Dockerfile.j2 rename to roles/node_disks/molecule/default/Dockerfile diff --git a/roles/node_disks/molecule/default/molecule.yml b/roles/node_disks/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/node_disks/molecule/default/molecule.yml +++ b/roles/node_disks/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/node_health/molecule/default/Dockerfile.j2 b/roles/node_health/molecule/default/Dockerfile similarity index 100% rename from roles/node_health/molecule/default/Dockerfile.j2 rename to roles/node_health/molecule/default/Dockerfile diff --git a/roles/node_health/molecule/default/molecule.yml b/roles/node_health/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/node_health/molecule/default/molecule.yml +++ b/roles/node_health/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/nova_event_callback/molecule/default/Dockerfile.j2 b/roles/nova_event_callback/molecule/default/Dockerfile similarity index 100% rename from roles/nova_event_callback/molecule/default/Dockerfile.j2 rename to roles/nova_event_callback/molecule/default/Dockerfile diff --git a/roles/nova_event_callback/molecule/default/molecule.yml b/roles/nova_event_callback/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/nova_event_callback/molecule/default/molecule.yml +++ b/roles/nova_event_callback/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/nova_status/molecule/default/Dockerfile.j2 b/roles/nova_status/molecule/default/Dockerfile similarity index 100% rename from roles/nova_status/molecule/default/Dockerfile.j2 rename to roles/nova_status/molecule/default/Dockerfile diff --git a/roles/nova_status/molecule/default/molecule.yml b/roles/nova_status/molecule/default/molecule.yml index c61de261e..8afc48656 100644 --- a/roles/nova_status/molecule/default/molecule.yml +++ b/roles/nova_status/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 PyYAML + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com + dockerfile: Dockerfile + pkg_extras: python*-setuptools python*-enum34 python*-pyyaml volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/nova_svirt/molecule/default/molecule.yml b/roles/nova_svirt/molecule/default/molecule.yml index 84aed31e1..97c395a60 100644 --- a/roles/nova_svirt/molecule/default/molecule.yml +++ b/roles/nova_svirt/molecule/default/molecule.yml @@ -5,38 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com dockerfile: Dockerfile - pkg_extras: python-setuptools python-lxml + pkg_extras: python*-setuptools + privileged: true volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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') }}" ulimits: &ulimit - host - - name: centos8 - hostname: centos8 - image: centos:8 - dockerfile: Dockerfile - pkg_extras: python*-setuptools python*-lxml - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/nova_svirt/molecule/default/prepare.yml b/roles/nova_svirt/molecule/default/prepare.yml index 0b557b415..ee5699658 100644 --- a/roles/nova_svirt/molecule/default/prepare.yml +++ b/roles/nova_svirt/molecule/default/prepare.yml @@ -18,6 +18,11 @@ - name: Prepare hosts: all tasks: + - name: Install python lxml library + package: + name: python*-lxml + state: present + - name: Create directory tree file: path: "{{ item }}" diff --git a/roles/openshift_on_openstack/molecule/default/Dockerfile.j2 b/roles/openshift_on_openstack/molecule/default/Dockerfile similarity index 100% rename from roles/openshift_on_openstack/molecule/default/Dockerfile.j2 rename to roles/openshift_on_openstack/molecule/default/Dockerfile diff --git a/roles/openshift_on_openstack/molecule/default/molecule.yml b/roles/openshift_on_openstack/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/openshift_on_openstack/molecule/default/molecule.yml +++ b/roles/openshift_on_openstack/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/openstack_endpoints/molecule/default/Dockerfile.j2 b/roles/openstack_endpoints/molecule/default/Dockerfile similarity index 100% rename from roles/openstack_endpoints/molecule/default/Dockerfile.j2 rename to roles/openstack_endpoints/molecule/default/Dockerfile diff --git a/roles/openstack_endpoints/molecule/default/molecule.yml b/roles/openstack_endpoints/molecule/default/molecule.yml index 353ae4681..d3c8fa2e1 100644 --- a/roles/openstack_endpoints/molecule/default/molecule.yml +++ b/roles/openstack_endpoints/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML - easy_install: - - pip + - 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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/ovs_dpdk_pmd/molecule/default/Dockerfile.j2 b/roles/ovs_dpdk_pmd/molecule/default/Dockerfile similarity index 100% rename from roles/ovs_dpdk_pmd/molecule/default/Dockerfile.j2 rename to roles/ovs_dpdk_pmd/molecule/default/Dockerfile diff --git a/roles/ovs_dpdk_pmd/molecule/default/molecule.yml b/roles/ovs_dpdk_pmd/molecule/default/molecule.yml index 353ae4681..d6d397b26 100644 --- a/roles/ovs_dpdk_pmd/molecule/default/molecule.yml +++ b/roles/ovs_dpdk_pmd/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML - easy_install: - - pip + - 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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/pacemaker_status/molecule/default/Dockerfile.j2 b/roles/pacemaker_status/molecule/default/Dockerfile similarity index 100% rename from roles/pacemaker_status/molecule/default/Dockerfile.j2 rename to roles/pacemaker_status/molecule/default/Dockerfile diff --git a/roles/pacemaker_status/molecule/default/molecule.yml b/roles/pacemaker_status/molecule/default/molecule.yml index 603ec3b53..d6d397b26 100644 --- a/roles/pacemaker_status/molecule/default/molecule.yml +++ b/roles/pacemaker_status/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/package_version/molecule/default/Dockerfile.j2 b/roles/package_version/molecule/default/Dockerfile similarity index 100% rename from roles/package_version/molecule/default/Dockerfile.j2 rename to roles/package_version/molecule/default/Dockerfile diff --git a/roles/package_version/molecule/default/molecule.yml b/roles/package_version/molecule/default/molecule.yml index 353ae4681..d6d397b26 100644 --- a/roles/package_version/molecule/default/molecule.yml +++ b/roles/package_version/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML - easy_install: - - pip + - 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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/rabbitmq_limits/molecule/default/Dockerfile.j2 b/roles/rabbitmq_limits/molecule/default/Dockerfile similarity index 100% rename from roles/rabbitmq_limits/molecule/default/Dockerfile.j2 rename to roles/rabbitmq_limits/molecule/default/Dockerfile diff --git a/roles/rabbitmq_limits/molecule/default/molecule.yml b/roles/rabbitmq_limits/molecule/default/molecule.yml index 520da5a85..d3c8fa2e1 100644 --- a/roles/rabbitmq_limits/molecule/default/molecule.yml +++ b/roles/rabbitmq_limits/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/repos/molecule/default/Dockerfile.j2 b/roles/repos/molecule/default/Dockerfile similarity index 100% rename from roles/repos/molecule/default/Dockerfile.j2 rename to roles/repos/molecule/default/Dockerfile diff --git a/roles/repos/molecule/default/molecule.yml b/roles/repos/molecule/default/molecule.yml index 5a2edfc25..d3c8fa2e1 100644 --- a/roles/repos/molecule/default/molecule.yml +++ b/roles/repos/molecule/default/molecule.yml @@ -5,35 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - 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: diff --git a/roles/repos/molecule/default/verify.yml b/roles/repos/molecule/default/verify.yml deleted file mode 100644 index dfd4c7352..000000000 --- a/roles/repos/molecule/default/verify.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# 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. diff --git a/roles/stack_health/molecule/default/Dockerfile.j2 b/roles/stack_health/molecule/default/Dockerfile similarity index 100% rename from roles/stack_health/molecule/default/Dockerfile.j2 rename to roles/stack_health/molecule/default/Dockerfile diff --git a/roles/stack_health/molecule/default/molecule.yml b/roles/stack_health/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/stack_health/molecule/default/molecule.yml +++ b/roles/stack_health/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/stonith_exists/molecule/default/Dockerfile.j2 b/roles/stonith_exists/molecule/default/Dockerfile similarity index 100% rename from roles/stonith_exists/molecule/default/Dockerfile.j2 rename to roles/stonith_exists/molecule/default/Dockerfile diff --git a/roles/stonith_exists/molecule/default/molecule.yml b/roles/stonith_exists/molecule/default/molecule.yml index 5a2edfc25..d3c8fa2e1 100644 --- a/roles/stonith_exists/molecule/default/molecule.yml +++ b/roles/stonith_exists/molecule/default/molecule.yml @@ -5,35 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - 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: diff --git a/roles/switch_vlans/molecule/default/Dockerfile.j2 b/roles/switch_vlans/molecule/default/Dockerfile similarity index 100% rename from roles/switch_vlans/molecule/default/Dockerfile.j2 rename to roles/switch_vlans/molecule/default/Dockerfile diff --git a/roles/switch_vlans/molecule/default/molecule.yml b/roles/switch_vlans/molecule/default/molecule.yml index 603ec3b53..d3c8fa2e1 100644 --- a/roles/switch_vlans/molecule/default/molecule.yml +++ b/roles/switch_vlans/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/system_encoding/molecule/default/molecule.yml b/roles/system_encoding/molecule/default/molecule.yml index 59dcc5f9f..d3c8fa2e1 100644 --- a/roles/system_encoding/molecule/default/molecule.yml +++ b/roles/system_encoding/molecule/default/molecule.yml @@ -5,38 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com dockerfile: Dockerfile - pkg_extras: python-setuptools + pkg_extras: python*-setuptools volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - dockerfile: Dockerfile - pkg_extras: python*-setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/tls_everywhere/molecule/default/Dockerfile.j2 b/roles/tls_everywhere/molecule/default/Dockerfile similarity index 100% rename from roles/tls_everywhere/molecule/default/Dockerfile.j2 rename to roles/tls_everywhere/molecule/default/Dockerfile diff --git a/roles/tls_everywhere/molecule/default/molecule.yml b/roles/tls_everywhere/molecule/default/molecule.yml index ccf776734..5159092f3 100644 --- a/roles/tls_everywhere/molecule/default/molecule.yml +++ b/roles/tls_everywhere/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - name: ubi8 + hostname: ubi8 + image: ubi8/ubi-init + registry: + url: registry.access.redhat.com + dockerfile: Dockerfile + pkg_extras: python*-setuptools python*-pyyaml krb5-workstation volumes: - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/undercloud_debug/molecule/default/Dockerfile.j2 b/roles/undercloud_debug/molecule/default/Dockerfile similarity index 100% rename from roles/undercloud_debug/molecule/default/Dockerfile.j2 rename to roles/undercloud_debug/molecule/default/Dockerfile diff --git a/roles/undercloud_debug/molecule/default/molecule.yml b/roles/undercloud_debug/molecule/default/molecule.yml index c61de261e..d6d397b26 100644 --- a/roles/undercloud_debug/molecule/default/molecule.yml +++ b/roles/undercloud_debug/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/undercloud_disk_space/molecule/default/Dockerfile.j2 b/roles/undercloud_disk_space/molecule/default/Dockerfile similarity index 100% rename from roles/undercloud_disk_space/molecule/default/Dockerfile.j2 rename to roles/undercloud_disk_space/molecule/default/Dockerfile diff --git a/roles/undercloud_disk_space/molecule/default/molecule.yml b/roles/undercloud_disk_space/molecule/default/molecule.yml index 5a2edfc25..d3c8fa2e1 100644 --- a/roles/undercloud_disk_space/molecule/default/molecule.yml +++ b/roles/undercloud_disk_space/molecule/default/molecule.yml @@ -5,35 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - 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: diff --git a/roles/undercloud_heat_purge_deleted/molecule/default/Dockerfile.j2 b/roles/undercloud_heat_purge_deleted/molecule/default/Dockerfile similarity index 100% rename from roles/undercloud_heat_purge_deleted/molecule/default/Dockerfile.j2 rename to roles/undercloud_heat_purge_deleted/molecule/default/Dockerfile diff --git a/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml b/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml index 32ba1db11..d6d397b26 100644 --- a/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml +++ b/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml @@ -5,40 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - override_command: true - command: python -m SimpleHTTPServer 8787 - pkg_extras: python-setuptools python-enum34 python-netaddr epel-release ruby PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - override_command: true - command: python3 -m http.server 8787 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby epel-release python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/undercloud_process_count/molecule/default/Dockerfile.j2 b/roles/undercloud_process_count/molecule/default/Dockerfile similarity index 100% rename from roles/undercloud_process_count/molecule/default/Dockerfile.j2 rename to roles/undercloud_process_count/molecule/default/Dockerfile diff --git a/roles/undercloud_process_count/molecule/default/molecule.yml b/roles/undercloud_process_count/molecule/default/molecule.yml index ccf776734..d3c8fa2e1 100644 --- a/roles/undercloud_process_count/molecule/default/molecule.yml +++ b/roles/undercloud_process_count/molecule/default/molecule.yml @@ -5,36 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - pkg_extras: python-setuptools python-enum34 python-netaddr ruby epel-release PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/undercloud_tokenflush/molecule/default/Dockerfile.j2 b/roles/undercloud_tokenflush/molecule/default/Dockerfile similarity index 100% rename from roles/undercloud_tokenflush/molecule/default/Dockerfile.j2 rename to roles/undercloud_tokenflush/molecule/default/Dockerfile diff --git a/roles/undercloud_tokenflush/molecule/default/molecule.yml b/roles/undercloud_tokenflush/molecule/default/molecule.yml index 32ba1db11..d6d397b26 100644 --- a/roles/undercloud_tokenflush/molecule/default/molecule.yml +++ b/roles/undercloud_tokenflush/molecule/default/molecule.yml @@ -5,40 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - override_command: true - command: python -m SimpleHTTPServer 8787 - pkg_extras: python-setuptools python-enum34 python-netaddr epel-release ruby PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - override_command: true - command: python3 -m http.server 8787 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby epel-release python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/roles/undercloud_tokenflush/molecule/non-persistent-token-format/Dockerfile.j2 b/roles/undercloud_tokenflush/molecule/non-persistent-token-format/Dockerfile similarity index 100% rename from roles/undercloud_tokenflush/molecule/non-persistent-token-format/Dockerfile.j2 rename to roles/undercloud_tokenflush/molecule/non-persistent-token-format/Dockerfile diff --git a/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml b/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml index 32ba1db11..d6d397b26 100644 --- a/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml +++ b/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml @@ -5,40 +5,36 @@ driver: log: true platforms: - - name: centos7 - hostname: centos7 - image: centos:7 - override_command: true - command: python -m SimpleHTTPServer 8787 - pkg_extras: python-setuptools python-enum34 python-netaddr epel-release ruby PyYAML + - 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 - easy_install: - - pip + - /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 - - name: centos8 - hostname: centos8 - image: centos:8 - override_command: true - command: python3 -m http.server 8787 - pkg_extras: python*-setuptools python*-enum34 python*-netaddr ruby epel-release python*-PyYAML - volumes: - - /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro - environment: - <<: *env - ulimits: *ulimit - provisioner: name: ansible + inventory: + hosts: + all: + hosts: + ubi8: + ansible_python_interpreter: /usr/bin/python3 log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" + ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}" scenario: test_sequence: diff --git a/scripts/run-local-test b/scripts/run-local-test index ad350504b..fd67db15c 100755 --- a/scripts/run-local-test +++ b/scripts/run-local-test @@ -24,7 +24,7 @@ set -xeuo export PROJECT_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../" export ROLE_NAME="${ROLE_NAME:-$1}" -export TRIPLEO_JOB_ANSIBLE_ARGS=${TRIPLEO_JOB_ANSIBLE_ARGS:-"-v"} +export TRIPLEO_JOB_ANSIBLE_ARGS=${TRIPLEO_JOB_ANSIBLE_ARGS:-""} ## Main ---------------------------------------------------------------------- @@ -71,4 +71,5 @@ ansible-playbook -i "${PROJECT_DIR}/tests/hosts.ini" \ -e "ansible_user=${USER}" \ -e "ansible_user_dir=${HOME}" \ "${PROJECT_DIR}/tests/prepare-test-host.yml" \ - "${PROJECT_DIR}/ci/playbooks/run-local.yml" + "${PROJECT_DIR}/ci/playbooks/run-local.yml" \ + -v