From 8bbbe30c2a5e9614f6ef99656900d960176735c0 Mon Sep 17 00:00:00 2001 From: Super User Date: Tue, 12 May 2026 15:10:18 +0530 Subject: [PATCH 01/12] Fix LDAP test order: apply slapd.conf before testing user logins --- molecule/discovery/tests/sanity/test_slurm.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/molecule/discovery/tests/sanity/test_slurm.py b/molecule/discovery/tests/sanity/test_slurm.py index 2942dd07d..24a505268 100644 --- a/molecule/discovery/tests/sanity/test_slurm.py +++ b/molecule/discovery/tests/sanity/test_slurm.py @@ -465,8 +465,7 @@ def test_sinfo_nodes(host): @pytest.mark.sanity -@pytest.mark.build_stream -@pytest.mark.order(19) +@pytest.mark.order(21) def test_openmpi_installed(host): """ Test Case 16: Verify OpenMPI is installed and version matches software_config.json. @@ -502,8 +501,7 @@ def test_openmpi_installed(host): @pytest.mark.sanity -@pytest.mark.build_stream -@pytest.mark.order(20) +@pytest.mark.order(22) def test_ucx_installed(host): """ Test Case 17: Verify UCX is installed and version matches software_config.json. @@ -598,7 +596,7 @@ def test_ldms_sampler_plugins(host): # ============================================================================= @pytest.mark.sanity -@pytest.mark.order(19) +@pytest.mark.order(16) def test_ldap_slapd_configuration(host): """ Test Case 19: Apply external slapd.conf and verify LDAP service. @@ -629,7 +627,7 @@ def test_ldap_slapd_configuration(host): @pytest.mark.sanity -@pytest.mark.order(16) +@pytest.mark.order(17) def test_ldap_user_login_from_oim(host): """ Test Case 20: Verify LDAP users can SSH login from OIM. @@ -687,7 +685,7 @@ def test_ldap_user_login_from_oim(host): @pytest.mark.sanity -@pytest.mark.order(17) +@pytest.mark.order(18) def test_ldap_user_login_from_core(host): """ Test Case 21: Verify LDAP users can SSH login from omnia_core container. @@ -746,7 +744,7 @@ def test_ldap_user_login_from_core(host): @pytest.mark.sanity -@pytest.mark.order(18) +@pytest.mark.order(19) def test_pam_slurm_adopt(host): """ Test Case 22: Verify PAM slurm_adopt blocks login on slurm_node. From 5143a8a180a90b31212e36ae51fdf90513a3243c Mon Sep 17 00:00:00 2001 From: Super User Date: Tue, 12 May 2026 17:05:39 +0530 Subject: [PATCH 02/12] Restore @pytest.mark.build_stream markers for OpenMPI and UCX tests --- molecule/discovery/tests/sanity/test_slurm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/molecule/discovery/tests/sanity/test_slurm.py b/molecule/discovery/tests/sanity/test_slurm.py index 24a505268..6bebb155e 100644 --- a/molecule/discovery/tests/sanity/test_slurm.py +++ b/molecule/discovery/tests/sanity/test_slurm.py @@ -465,6 +465,7 @@ def test_sinfo_nodes(host): @pytest.mark.sanity +@pytest.mark.build_stream @pytest.mark.order(21) def test_openmpi_installed(host): """ @@ -501,6 +502,7 @@ def test_openmpi_installed(host): @pytest.mark.sanity +@pytest.mark.build_stream @pytest.mark.order(22) def test_ucx_installed(host): """ From 1d694c4598c7c008f6461e242fe1c7cde4b6ed16 Mon Sep 17 00:00:00 2001 From: Diya-Sumod Date: Tue, 12 May 2026 17:38:10 +0530 Subject: [PATCH 03/12] Update test_slurm.py Signed-off-by: Diya-Sumod --- molecule/discovery/tests/sanity/test_slurm.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/molecule/discovery/tests/sanity/test_slurm.py b/molecule/discovery/tests/sanity/test_slurm.py index 6bebb155e..7649fc9d7 100644 --- a/molecule/discovery/tests/sanity/test_slurm.py +++ b/molecule/discovery/tests/sanity/test_slurm.py @@ -469,7 +469,7 @@ def test_sinfo_nodes(host): @pytest.mark.order(21) def test_openmpi_installed(host): """ - Test Case 16: Verify OpenMPI is installed and version matches software_config.json. + Test Case 21: Verify OpenMPI is installed and version matches software_config.json. Skips if OpenMPI is not enabled in software_config.json. """ @@ -506,7 +506,7 @@ def test_openmpi_installed(host): @pytest.mark.order(22) def test_ucx_installed(host): """ - Test Case 17: Verify UCX is installed and version matches software_config.json. + Test Case 22: Verify UCX is installed and version matches software_config.json. Skips if UCX is not enabled in software_config.json. """ @@ -601,7 +601,7 @@ def test_ldms_sampler_plugins(host): @pytest.mark.order(16) def test_ldap_slapd_configuration(host): """ - Test Case 19: Apply external slapd.conf and verify LDAP service. + Test Case 16: Apply external slapd.conf and verify LDAP service. Skips if OpenLDAP is not enabled in software_config.json. @@ -632,7 +632,7 @@ def test_ldap_slapd_configuration(host): @pytest.mark.order(17) def test_ldap_user_login_from_oim(host): """ - Test Case 20: Verify LDAP users can SSH login from OIM. + Test Case 17: Verify LDAP users can SSH login from OIM. Skips if OpenLDAP is not enabled in software_config.json. @@ -690,7 +690,7 @@ def test_ldap_user_login_from_oim(host): @pytest.mark.order(18) def test_ldap_user_login_from_core(host): """ - Test Case 21: Verify LDAP users can SSH login from omnia_core container. + Test Case 18: Verify LDAP users can SSH login from omnia_core container. Skips if OpenLDAP is not enabled in software_config.json. @@ -749,7 +749,7 @@ def test_ldap_user_login_from_core(host): @pytest.mark.order(19) def test_pam_slurm_adopt(host): """ - Test Case 22: Verify PAM slurm_adopt blocks login on slurm_node. + Test Case 19: Verify PAM slurm_adopt blocks login on slurm_node. Skips if OpenLDAP is not enabled in software_config.json. From 0763ff9bfdd5749f0f0ccc8344c6e66e730ed3b9 Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Thu, 14 May 2026 22:51:53 +0530 Subject: [PATCH 04/12] Fix discovery set_pxe_boot playbook check and add squashfs-tools installation - Remove pipefail from set_pxe_boot playbook check to avoid SIGPIPE error - Add failed_when: false to handle playbook check gracefully - Install squashfs-tools automatically in build_image_x86_64 and build_image_aarch64 - Remove @pytest.mark.sanity from test_all_pxe_nodes_in_slurm_cluster --- molecule/build_image_aarch64/converge.yml | 15 +++++++++++++++ molecule/build_image_x86_64/converge.yml | 15 +++++++++++++++ molecule/discovery/converge.yml | 3 ++- molecule/slurm/tests/sanity/test_slurm.py | 1 - 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/molecule/build_image_aarch64/converge.yml b/molecule/build_image_aarch64/converge.yml index 3d8a2e2ac..ac6a0df3c 100644 --- a/molecule/build_image_aarch64/converge.yml +++ b/molecule/build_image_aarch64/converge.yml @@ -104,6 +104,21 @@ ansible.builtin.debug: msg: "✔ All S3 containers are running: {{ s3_containers | join(', ') }}" + # ========================================================================= + # INSTALL SQUASHFS-TOOLS (REQUIRED FOR MOUNTING S3 IMAGES) + # ========================================================================= + + - name: Install squashfs-tools package in omnia_core container + ansible.builtin.shell: + cmd: podman exec {{ container_name }} dnf install -y squashfs-tools + register: squashfs_install + changed_when: squashfs_install.rc == 0 + failed_when: false + + - name: Display squashfs-tools installation result + ansible.builtin.debug: + msg: "squashfs-tools installation: {{ 'SUCCESS' if squashfs_install.rc == 0 else 'FAILED (may already be installed)' }}" + # ========================================================================= # SYNC PROJECT_DEFAULT INTO CONTAINER # ========================================================================= diff --git a/molecule/build_image_x86_64/converge.yml b/molecule/build_image_x86_64/converge.yml index 6efa59e71..75b661554 100644 --- a/molecule/build_image_x86_64/converge.yml +++ b/molecule/build_image_x86_64/converge.yml @@ -104,6 +104,21 @@ ansible.builtin.debug: msg: "✔ All S3 containers are running: {{ s3_containers | join(', ') }}" + # ========================================================================= + # INSTALL SQUASHFS-TOOLS (REQUIRED FOR MOUNTING S3 IMAGES) + # ========================================================================= + + - name: Install squashfs-tools package in omnia_core container + ansible.builtin.shell: + cmd: podman exec {{ container_name }} dnf install -y squashfs-tools + register: squashfs_install + changed_when: squashfs_install.rc == 0 + failed_when: false + + - name: Display squashfs-tools installation result + ansible.builtin.debug: + msg: "squashfs-tools installation: {{ 'SUCCESS' if squashfs_install.rc == 0 else 'FAILED (may already be installed)' }}" + # ========================================================================= # SYNC PROJECT_DEFAULT INTO CONTAINER # ========================================================================= diff --git a/molecule/discovery/converge.yml b/molecule/discovery/converge.yml index 32b61c3b3..7b4556756 100644 --- a/molecule/discovery/converge.yml +++ b/molecule/discovery/converge.yml @@ -293,10 +293,11 @@ ansible.builtin.shell: # noqa: risky-shell-pipe cmd: > podman exec {{ container_name }} - bash -o pipefail -c + bash -c 'ls /omnia/utils/set_pxe_boot.yml /omnia/discovery/set_pxe_boot.yml 2>/dev/null | head -1' register: pxe_boot_playbook_check changed_when: false + failed_when: false - name: Set PXE boot playbook path ansible.builtin.set_fact: diff --git a/molecule/slurm/tests/sanity/test_slurm.py b/molecule/slurm/tests/sanity/test_slurm.py index 84b1b4353..86de4f776 100644 --- a/molecule/slurm/tests/sanity/test_slurm.py +++ b/molecule/slurm/tests/sanity/test_slurm.py @@ -109,7 +109,6 @@ # TC1: All nodes from PXE mapping are joined to Slurm cluster # ============================================================================= -@pytest.mark.sanity @pytest.mark.order(1) def test_all_pxe_nodes_in_slurm_cluster(host): """Test that all nodes in PXE mapping are joined to the Slurm cluster.""" From 898be89511665bfbf10791f89081538e665f52f9 Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Thu, 14 May 2026 22:55:40 +0530 Subject: [PATCH 05/12] Fix build_image playbook hanging by removing -it flags from podman exec - Remove -it flags from podman exec in build_image_x86_64 converge.yml - Remove -it flags from podman exec in build_image_aarch64 converge.yml - This prevents hanging in non-interactive contexts like molecule/pytest --- molecule/build_image_aarch64/converge.yml | 2 +- molecule/build_image_x86_64/converge.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/build_image_aarch64/converge.yml b/molecule/build_image_aarch64/converge.yml index ac6a0df3c..37f01ca5f 100644 --- a/molecule/build_image_aarch64/converge.yml +++ b/molecule/build_image_aarch64/converge.yml @@ -147,7 +147,7 @@ - name: Execute build_image_aarch64 playbook in omnia_core container ansible.builtin.shell: cmd: | - podman exec -it -w /omnia/build_image_aarch64 {{ container_name }} \ + podman exec -w /omnia/build_image_aarch64 {{ container_name }} \ ansible-playbook build_image_aarch64.yml -v register: playbook_result when: "'EXISTS' in playbook_check.stdout" diff --git a/molecule/build_image_x86_64/converge.yml b/molecule/build_image_x86_64/converge.yml index 75b661554..828435820 100644 --- a/molecule/build_image_x86_64/converge.yml +++ b/molecule/build_image_x86_64/converge.yml @@ -147,7 +147,7 @@ - name: Execute build_image_x86_64 playbook in omnia_core container ansible.builtin.shell: cmd: | - podman exec -it -w /omnia/build_image_x86_64 {{ container_name }} \ + podman exec -w /omnia/build_image_x86_64 {{ container_name }} \ ansible-playbook build_image_x86_64.yml -v register: playbook_result when: "'EXISTS' in playbook_check.stdout" From 9d212163e161bf171dca21c0a8306334c52baec2 Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Fri, 15 May 2026 07:26:37 +0530 Subject: [PATCH 06/12] Fix import error in run_prereq_check.py - Change import from automation_library.core.formatting to automation_library.core - set_debug_mode is exported from core.__init__.py, not from a separate formatting module --- run_prereq_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_prereq_check.py b/run_prereq_check.py index 47200433e..6ea8ab881 100755 --- a/run_prereq_check.py +++ b/run_prereq_check.py @@ -38,7 +38,7 @@ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from automation_library.checks.functions.main import run_all_prereq_checks -from automation_library.core.formatting import set_debug_mode +from automation_library.core import set_debug_mode def main(): From 26cf8c0b0dac9a516b85cdbdd3c032d5c0e1475c Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Sun, 17 May 2026 19:34:48 +0530 Subject: [PATCH 07/12] Add executable permission to omnia.sh before uninstall --- molecule/omnia_sh_uninstall/converge.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/molecule/omnia_sh_uninstall/converge.yml b/molecule/omnia_sh_uninstall/converge.yml index 7b0da226b..96b7f1cee 100644 --- a/molecule/omnia_sh_uninstall/converge.yml +++ b/molecule/omnia_sh_uninstall/converge.yml @@ -61,6 +61,12 @@ msg: "Container {{ container_name }} not found on {{ ansible_host }}, skipping uninstall" when: container_exists.rc != 0 + - name: Make omnia.sh executable + ansible.builtin.file: + path: "{{ omnia_sh_path }}" + mode: '0755' + when: container_exists.rc == 0 + - name: Run omnia.sh --uninstall with auto-confirm ansible.builtin.shell: cmd: set -o pipefail && echo "y" | {{ omnia_sh_path }} --uninstall From d5196468c79e51ed88c2a24ee3bfa741217aa935 Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Sun, 17 May 2026 20:04:15 +0530 Subject: [PATCH 08/12] Fix ansible-lint: use command instead of shell for squashfs-tools installation --- molecule/build_image_aarch64/converge.yml | 2 +- molecule/build_image_x86_64/converge.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/build_image_aarch64/converge.yml b/molecule/build_image_aarch64/converge.yml index 37f01ca5f..24ef98b2a 100644 --- a/molecule/build_image_aarch64/converge.yml +++ b/molecule/build_image_aarch64/converge.yml @@ -109,7 +109,7 @@ # ========================================================================= - name: Install squashfs-tools package in omnia_core container - ansible.builtin.shell: + ansible.builtin.command: cmd: podman exec {{ container_name }} dnf install -y squashfs-tools register: squashfs_install changed_when: squashfs_install.rc == 0 diff --git a/molecule/build_image_x86_64/converge.yml b/molecule/build_image_x86_64/converge.yml index 828435820..317a3eba1 100644 --- a/molecule/build_image_x86_64/converge.yml +++ b/molecule/build_image_x86_64/converge.yml @@ -109,7 +109,7 @@ # ========================================================================= - name: Install squashfs-tools package in omnia_core container - ansible.builtin.shell: + ansible.builtin.command: cmd: podman exec {{ container_name }} dnf install -y squashfs-tools register: squashfs_install changed_when: squashfs_install.rc == 0 From 5a22dc2c2cea53d47b184d47d1751e4e34825b0b Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Mon, 18 May 2026 15:13:01 +0530 Subject: [PATCH 09/12] Add file existence check for omnia.sh before uninstall --- molecule/omnia_sh_uninstall/converge.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/molecule/omnia_sh_uninstall/converge.yml b/molecule/omnia_sh_uninstall/converge.yml index 96b7f1cee..ec3be015d 100644 --- a/molecule/omnia_sh_uninstall/converge.yml +++ b/molecule/omnia_sh_uninstall/converge.yml @@ -61,25 +61,36 @@ msg: "Container {{ container_name }} not found on {{ ansible_host }}, skipping uninstall" when: container_exists.rc != 0 + - name: Check if omnia.sh exists + ansible.builtin.stat: + path: "{{ omnia_sh_path }}" + register: omnia_sh_stat + when: container_exists.rc == 0 + + - name: Skip uninstall if omnia.sh doesn't exist + ansible.builtin.debug: + msg: "omnia.sh not found at {{ omnia_sh_path }}, skipping uninstall" + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists + - name: Make omnia.sh executable ansible.builtin.file: path: "{{ omnia_sh_path }}" mode: '0755' - when: container_exists.rc == 0 + when: container_exists.rc == 0 and omnia_sh_stat.stat.exists - name: Run omnia.sh --uninstall with auto-confirm ansible.builtin.shell: cmd: set -o pipefail && echo "y" | {{ omnia_sh_path }} --uninstall register: uninstall_result - when: container_exists.rc == 0 + when: container_exists.rc == 0 and omnia_sh_stat.stat.exists changed_when: uninstall_result.rc == 0 - name: Fail if uninstall failed ansible.builtin.fail: msg: "omnia.sh --uninstall failed: {{ uninstall_result.stderr | default('Unknown error') }}" - when: container_exists.rc == 0 and uninstall_result.rc != 0 + when: container_exists.rc == 0 and omnia_sh_stat.stat.exists and uninstall_result.rc != 0 - name: Cleanup completed ansible.builtin.debug: msg: "omnia.sh --uninstall completed on {{ ansible_host }}" - when: container_exists.rc == 0 + when: container_exists.rc == 0 and omnia_sh_stat.stat.exists From 8397cedd2030f2a52493798b1b76b54bbc56e407 Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Mon, 18 May 2026 16:30:25 +0530 Subject: [PATCH 10/12] Add omnia.sh download logic from GitHub using omnia_version from config --- molecule/omnia_sh_uninstall/converge.yml | 33 +++++++++++++++++++----- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/molecule/omnia_sh_uninstall/converge.yml b/molecule/omnia_sh_uninstall/converge.yml index ec3be015d..8e56781bc 100644 --- a/molecule/omnia_sh_uninstall/converge.yml +++ b/molecule/omnia_sh_uninstall/converge.yml @@ -42,6 +42,7 @@ omnia_clone_path: "{{ omnia_test_config.omnia_clone_path | default('/opt/omnia-artifactory') }}" omnia_sh_path: "{{ omnia_clone_path }}/omnia.sh" omnia_shared_path: "{{ omnia_test_config.omnia_shared_path | default('/opt/omnia') }}" + omnia_version: "{{ omnia_test_config.omnia_version }}" container_name: "omnia_core" tasks: @@ -67,30 +68,48 @@ register: omnia_sh_stat when: container_exists.rc == 0 - - name: Skip uninstall if omnia.sh doesn't exist - ansible.builtin.debug: - msg: "omnia.sh not found at {{ omnia_sh_path }}, skipping uninstall" + - name: Download omnia.sh from GitHub (tags) + ansible.builtin.get_url: + url: "https://raw.githubusercontent.com/dell/omnia/refs/tags/{{ omnia_version }}/omnia.sh" + dest: "{{ omnia_sh_path }}" + mode: '0755' + register: download_tags when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists + failed_when: false + + - name: Download omnia.sh from GitHub (heads) if tags failed + ansible.builtin.get_url: + url: "https://raw.githubusercontent.com/dell/omnia/refs/heads/{{ omnia_version }}/omnia.sh" + dest: "{{ omnia_sh_path }}" + mode: '0755' + register: download_heads + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and download_tags is failed + failed_when: false + + - name: Skip uninstall if omnia.sh download failed + ansible.builtin.debug: + msg: "Failed to download omnia.sh from both tags and heads, skipping uninstall" + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and download_tags is failed and download_heads is failed - name: Make omnia.sh executable ansible.builtin.file: path: "{{ omnia_sh_path }}" mode: '0755' - when: container_exists.rc == 0 and omnia_sh_stat.stat.exists + when: container_exists.rc == 0 and (omnia_sh_stat.stat.exists or download_tags is succeeded or download_heads is succeeded) - name: Run omnia.sh --uninstall with auto-confirm ansible.builtin.shell: cmd: set -o pipefail && echo "y" | {{ omnia_sh_path }} --uninstall register: uninstall_result - when: container_exists.rc == 0 and omnia_sh_stat.stat.exists + when: container_exists.rc == 0 and (omnia_sh_stat.stat.exists or download_tags is succeeded or download_heads is succeeded) changed_when: uninstall_result.rc == 0 - name: Fail if uninstall failed ansible.builtin.fail: msg: "omnia.sh --uninstall failed: {{ uninstall_result.stderr | default('Unknown error') }}" - when: container_exists.rc == 0 and omnia_sh_stat.stat.exists and uninstall_result.rc != 0 + when: container_exists.rc == 0 and (omnia_sh_stat.stat.exists or download_tags is succeeded or download_heads is succeeded) and uninstall_result.rc != 0 - name: Cleanup completed ansible.builtin.debug: msg: "omnia.sh --uninstall completed on {{ ansible_host }}" - when: container_exists.rc == 0 and omnia_sh_stat.stat.exists + when: container_exists.rc == 0 and (omnia_sh_stat.stat.exists or download_tags is succeeded or download_heads is succeeded) From 69472717805552f1b51ef72dcef42f80ea44a15a Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Mon, 18 May 2026 17:17:10 +0530 Subject: [PATCH 11/12] Use omnia_branch instead of omnia_version for downloading omnia.sh --- molecule/omnia_sh_uninstall/converge.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/molecule/omnia_sh_uninstall/converge.yml b/molecule/omnia_sh_uninstall/converge.yml index 8e56781bc..15cfd5f9e 100644 --- a/molecule/omnia_sh_uninstall/converge.yml +++ b/molecule/omnia_sh_uninstall/converge.yml @@ -42,7 +42,7 @@ omnia_clone_path: "{{ omnia_test_config.omnia_clone_path | default('/opt/omnia-artifactory') }}" omnia_sh_path: "{{ omnia_clone_path }}/omnia.sh" omnia_shared_path: "{{ omnia_test_config.omnia_shared_path | default('/opt/omnia') }}" - omnia_version: "{{ omnia_test_config.omnia_version }}" + omnia_branch: "{{ omnia_test_config.get('omnia_branch', '') }}" container_name: "omnia_core" tasks: @@ -68,28 +68,38 @@ register: omnia_sh_stat when: container_exists.rc == 0 + - name: Check if omnia_branch is defined + ansible.builtin.debug: + msg: "omnia_branch: {{ omnia_branch }}" + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists + + - name: Skip download if omnia_branch not defined + ansible.builtin.debug: + msg: "omnia_branch not defined in omnia_test_config.yml, skipping download" + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and omnia_branch == '' + - name: Download omnia.sh from GitHub (tags) ansible.builtin.get_url: - url: "https://raw.githubusercontent.com/dell/omnia/refs/tags/{{ omnia_version }}/omnia.sh" + url: "https://raw.githubusercontent.com/dell/omnia/refs/tags/{{ omnia_branch }}/omnia.sh" dest: "{{ omnia_sh_path }}" mode: '0755' register: download_tags - when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and omnia_branch != '' failed_when: false - name: Download omnia.sh from GitHub (heads) if tags failed ansible.builtin.get_url: - url: "https://raw.githubusercontent.com/dell/omnia/refs/heads/{{ omnia_version }}/omnia.sh" + url: "https://raw.githubusercontent.com/dell/omnia/refs/heads/{{ omnia_branch }}/omnia.sh" dest: "{{ omnia_sh_path }}" mode: '0755' register: download_heads - when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and download_tags is failed + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and omnia_branch != '' and download_tags is failed failed_when: false - name: Skip uninstall if omnia.sh download failed ansible.builtin.debug: msg: "Failed to download omnia.sh from both tags and heads, skipping uninstall" - when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and download_tags is failed and download_heads is failed + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and omnia_branch != '' and download_tags is failed and download_heads is failed - name: Make omnia.sh executable ansible.builtin.file: From d62573c653ad4f2358728e13fe7f5c6aa040f143 Mon Sep 17 00:00:00 2001 From: diya-sumod Date: Mon, 18 May 2026 17:38:32 +0530 Subject: [PATCH 12/12] Create omnia_clone_path directory before downloading omnia.sh --- molecule/omnia_sh_uninstall/converge.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/molecule/omnia_sh_uninstall/converge.yml b/molecule/omnia_sh_uninstall/converge.yml index 15cfd5f9e..73dc07dca 100644 --- a/molecule/omnia_sh_uninstall/converge.yml +++ b/molecule/omnia_sh_uninstall/converge.yml @@ -78,6 +78,13 @@ msg: "omnia_branch not defined in omnia_test_config.yml, skipping download" when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and omnia_branch == '' + - name: Create omnia_clone_path directory + ansible.builtin.file: + path: "{{ omnia_clone_path }}" + state: directory + mode: '0755' + when: container_exists.rc == 0 and not omnia_sh_stat.stat.exists and omnia_branch != '' + - name: Download omnia.sh from GitHub (tags) ansible.builtin.get_url: url: "https://raw.githubusercontent.com/dell/omnia/refs/tags/{{ omnia_branch }}/omnia.sh"