Fix playbook errors found by debugging

This commit is contained in:
Alan Rominger
2023-07-11 16:25:37 -04:00
committed by Dave
parent 7ab2bca16e
commit 14454cc670

View File

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