Skip to content

Commit

Permalink
Fix playbook errors found by debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Jul 11, 2023
1 parent 9b3f462 commit ac73739
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions awx/playbooks/project_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Expand All @@ -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

Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit ac73739

Please sign in to comment.