Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion roles/installmq/tasks/Linux_installmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,21 @@

- name: Create a list of paths to the packages from found files
ansible.builtin.set_fact:
package_list: "{{ package_files.results | map(attribute='files.0.path') | list }}"
package_list: "{{ package_list | default([]) + [item.files.0.path | string] }}"
loop:
"{{ package_files.results }}"
when:
- item.files is defined and item.files | length > 0 and item.files.0.path is defined
- ansible_architecture == 'aarch64'
Comment on lines +67 to +69
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this changes the behaviour, but could the conditions be broken down further to make it more readable?

Very minor though - if this suggestion changes the logic don't worry about it! Otherwise looks great

Suggested change
when:
- item.files is defined and item.files | length > 0 and item.files.0.path is defined
- ansible_architecture == 'aarch64'
when:
- item.files is defined
- item.files | length > 0
- item.files.0.path is defined
- ansible_architecture == 'aarch64'



- name: Create a list of paths to the packages from found files
ansible.builtin.set_fact:
package_list: "{{ package_files.results.0 | map(attribute='files.0.path') | list }}"
when:
- "'MQSeriesRuntime' not in ansible_facts.packages"
- "'ibmmq-runtime' not in ansible_facts.packages"
- ansible_architecture != 'aarch64'

- name: Rpm Installation
ansible.builtin.dnf:
Expand Down