collection: Automatically identify the dependent lsr collection
We might be able to set the lsr dependency automatically from checking the content of variable ansible_collection_name, see also https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html and https://docs.ansible.com/ansible/2.9/reference_appendices/special_variables.html.
@berndfinger is this still an open issue?
@kksat Yes, it's still open. @sean-freeman @rhmk I just had a look at https://github.com/sap-linuxlab/community.sap_install/issues/354. To me, it looks like the following should work:
- In the code of the affected roles, we no longer use the variable
sap_general_preconfigure_system_roles_collectionbut a new role internal variable__sap_general_preconfigure_system_roles_collection. - If the variable
sap_general_preconfigure_system_roles_collectionis defined, we use its value for setting the internal variable__sap_general_preconfigure_system_roles_collection. - If
sap_general_preconfigure_system_roles_collectionis not defined, which would be the default, the following rules apply:- If
ansible_collection_nameiscommunity.sap_install, we set__sap_general_preconfigure_system_roles_collectiontofedora.linux_system_roles. - If
ansible_collection_nameisredhat.sap_install, we set__sap_general_preconfigure_system_roles_collectiontoredhat.rhel_system_roles.
- If
@berndfinger : please ensure that ansible_collection_name is set (e.g. if called as system-role from rpm, it might be unset or set differently) - in that case, you may need to double-check with ansible_role_name
No update for more than a year, so moving to backlog.