Problem
The logic for IIM always attempts to download from an http instaed of a local source, even when download_url is not defined
Cause
default/main.yml has download_url set with an empty string.
https://github.com/merative/spm-middleware/blob/main/roles/iim/defaults/main.yml#L5
This causes the when: download_url is defined when clause return false, when it should return true
https://github.com/merative/spm-middleware/blob/main/roles/iim/tasks/linux_common.yml#L22
Steps to reproduce
- name: Install IBM Installation Manager
ansible.builtin.include_role:
name: merative.spm_middleware.iim
vars:
iim_agent_version: "1.9.1001.20240227_0018"
iim_install_path: "/opt/oms/softwares/IIM"
Expected Results
The playbook should run the Copy installer and skip the Download installer step
Actual Results
The playbook skips the Copy installer step and continues with the Download installer step
TASK [merative.spm_middleware.iim : Copy installer] ****************************
skipping: [node1.example.com] => {"changed": false, "false_condition": "download_url is not defined", "skip_reason": "Conditional result was False"}
TASK [merative.spm_middleware.iim : Download installer] ************************
fatal: [node1.example.com]: FAILED! => {"changed": false, "msg": "unknown url type: '//tmp/agent.installer.linux.gtk.x86_64_1.9.2008.20240227_0018.zip'", "status": -1, "url": "//tmp/agent.installer.linux.gtk.x86_64_1.9.2008.20240227_0018.zip"}
Solution
Either remove the empty string from defaults/main.yml or make the when treat empty strings as undefined.
Problem
The logic for IIM always attempts to download from an http instaed of a local source, even when
download_urlis not definedCause
default/main.yml has
download_urlset with an empty string.https://github.com/merative/spm-middleware/blob/main/roles/iim/defaults/main.yml#L5
This causes the
when: download_url is definedwhen clause return false, when it should return truehttps://github.com/merative/spm-middleware/blob/main/roles/iim/tasks/linux_common.yml#L22
Steps to reproduce
Expected Results
The playbook should run the
Copy installerand skip theDownload installerstepActual Results
The playbook skips the
Copy installerstep and continues with theDownload installerstepSolution
Either remove the empty string from
defaults/main.ymlor make thewhentreat empty strings as undefined.