IBM / ansible-role-infosvr

Ansible role for automating the deployment of IBM InfoSphere Information Server
Apache License 2.0
15 stars 12 forks source link

Functioning without IBM.infosvr-metadata-asset-manager #27

Open timrburnham opened 4 years ago

timrburnham commented 4 years ago

My organization only uses this role to deploy the Client tier, not Services/Engine/other tiers. For this reason, we have not installed IBM.infosvr-metadata-asset-manager. That causes this error, excuse me for omitting paths:

statically imported: [PATH]/roles/IBM.infosvr/tasks/configure/configure-ia.yml
ERROR! the role 'IBM.infosvr-metadata-asset-manager' was not found in [PATH]/roles:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:[PATH]

Ansible documentation for the related import_role points out:

  • Most keywords, loops and conditionals will only be applied to the imported tasks, not to this statement itself. If you want the opposite behavior, use include_role instead.

(The import_tasks documentation doesn't draw the distinction between import and include, but it probably should--it clearly still applies).

include_tasks does not cooperate with become, so I did the following in tasks/configure.yml for the 2 tasks which import IBM.infosvr-metadata-asset-manager:

-- import_tasks: configure/configure-ia.yml
+- include_tasks: configure/configure-ia.yml
-  become_user: root
-  become: yes
  when: __ibm_infosvr_features.ia
-- import_tasks: configure/configure-em.yml
+- include_tasks: configure/configure-em.yml
-  become_user: root
-  become: yes
  when: __ibm_infosvr_features.event_mgmt

I won't be able to submit a PR, as I am unable to complete testing in our environment. Don't wanna break anything for people actually using this feature. But I suspect the become options can be shoved down further into the task itself.

cmgrote commented 4 years ago

Hi @timrburnham -- thanks for raising this, it makes sense. I'll add it to my backlog to investigate how to make the reliance on the metadata-asset-manager role optional when configuring these server-side pieces is not actually something that will be done anyway.