Skip to content

IIM always attempts to download from http #132

@spencer-cdw

Description

@spencer-cdw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions