From 0a431790e87df7069e9d3fed71652b6ec551b1f7 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 26 Oct 2024 13:02:23 -0500 Subject: [PATCH] packer-rocm/amdgpu_install: make 'when' for 'amdgpu-repo' more defensive --- packer-rocm/playbooks/roles/amdgpu_install/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packer-rocm/playbooks/roles/amdgpu_install/tasks/main.yml b/packer-rocm/playbooks/roles/amdgpu_install/tasks/main.yml index 28547bd..aacf6b3 100644 --- a/packer-rocm/playbooks/roles/amdgpu_install/tasks/main.yml +++ b/packer-rocm/playbooks/roles/amdgpu_install/tasks/main.yml @@ -56,7 +56,7 @@ - name: Gather package facts ansible.builtin.package_facts: -- name: "Internal : 'amdgpu-repo' (when 'internal' and builds provided)" +- name: "Internal : 'amdgpu-repo' (when 'internal' and build(s) provided)" become: true changed_when: true # satisfy linting, assume changed when run ansible.builtin.shell: > @@ -64,6 +64,7 @@ {% if amdgpu_install_rocm_branch is defined %}--rocm-build={{ amdgpu_install_rocm_branch }}{% endif %} {% if amdgpu_install_branch is defined %}--amdgpu-build={{ amdgpu_install_branch }}{% endif %} when: + - (amdgpu_install_rocm_branch is defined) or (amdgpu_install_rocm_branch is defined) - '"amdgpu-install-internal" in ansible_facts.packages' # generally does not apply to GA releases, internal only - name: "Install 'extra' packages"