diff --git a/awx/playbooks/project_update.yml b/awx/playbooks/project_update.yml index f32e761a413f..261c2b57e51e 100644 --- a/awx/playbooks/project_update.yml +++ b/awx/playbooks/project_update.yml @@ -219,14 +219,14 @@ cmd: "ansible-galaxy role install -r {{ req_file }} {{ verbosity }}" register: galaxy_result vars: - req_file: "{{ req_candidates | first_found }}" + req_file: "{{ lookup('ansible.builtin.first_found', req_candidates, skip=True) }}" req_candidates: - "{{ project_path | quote }}/roles/requirements.yml" - "{{ project_path | quote }}/roles/requirements.yaml" changed_when: "'was installed successfully' in galaxy_result.stdout" when: - roles_enabled | bool - - req_file is file + - req_file tags: - install_roles @@ -235,7 +235,7 @@ cmd: "ansible-galaxy collection install -r {{ req_file }} {{ verbosity }}" register: galaxy_collection_result vars: - req_file: "{{ req_candidates | first_found }}" + req_file: "{{ lookup('ansible.builtin.first_found', req_candidates, skip=True) }}" req_candidates: - "{{ project_path | quote }}/collections/requirements.yml" - "{{ project_path | quote }}/collections/requirements.yaml" @@ -245,7 +245,7 @@ when: - "ansible_version.full is version_compare('2.9', '>=')" - collections_enabled | bool - - req_file is file + - req_file tags: - install_collections @@ -254,7 +254,7 @@ cmd: "ansible-galaxy install -r {{ req_file }} {{ verbosity }}" register: galaxy_combined_result vars: - req_file: "{{ req_candidates | first_found }}" + req_file: "{{ lookup('ansible.builtin.first_found', req_candidates, skip=True) }}" req_candidates: - "{{ project_path | quote }}/requirements.yaml" - "{{ project_path | quote }}/requirements.yml" @@ -263,7 +263,7 @@ - "ansible_version.full is version_compare('2.10', '>=')" - collections_enabled | bool - roles_enabled | bool - - req_file is file + - req_file tags: - install_collections - install_roles