-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sap_general_preconfigure/RHEL: Add FQCN to include_role tasks #826
Comments
@marcelmamula I ran some tests and I think we should not use the We have to consider at least the following different scenarios:
1 - Run
3 - Call the role But it might be that I missed some important aspects of your issue. In this case, can you please explain how you would like to install the role |
@berndfinger I have raised this issue because my test plays are structured to run every AP4S play step with switch so I can always test latest git clone before submitting PR changes. Below is example for my local git clone inside of location in WSL2: - name: Execute Ansible Role sap_general_preconfigure
ansible.builtin.include_role:
name: "{{ '/mnt/c/scripts/community.sap_install/roles/sap_general_preconfigure' if run_local
else 'community.sap_install.sap_general_preconfigure' }}" # noqa role-name[path] This is first occasion where it failed because role itself attempted to find role in my execution folder, which failed since I am not running it from cloned repository. TASK [/mnt/c/scripts/community.sap_install/roles/sap_general_preconfigure : Configure - Include configuration actions for required sapnotes] ****************
fatal: [h01hana0]: FAILED! => {"reason": "the role 'sap_maintain_etc_hosts' was not found in /mnt/c/scripts/sap_hana_ha/roles |
I am trying to understand what you described, and combine it with the playbook and the output. So I am rephrasing and I'd like to ask you if my understanding is correct. 1 - You are cloning the GitHub repo 2 - You are also cloning the latest dev tree of the GitHub repo 3 - You are then switching to using the latest dev version of a role of the GitHub repo If this is a correct description, I see one problem if you are calling BTW. What I don't understand is why the failing task searches the dependent role in the path |
@berndfinger
This is my setup that worked for every role we have except |
We need to use the FQCN when importing the role sap_maintain_etc_hosts. Solves issue sap-linuxlab#826. Signed-off-by: Bernd Finger <[email protected]>
Solved in #827 . |
Current implementation of include_role call for
sap_maintain_etc_hosts
is calling without fully qualified collection name, resulting in failure when executed locally without collection.community.sap_install/roles/sap_general_preconfigure/tasks/sapnote/3108316/03-configure-hostname.yml
Line 18 in c1b479e
Solution: Change to either
community.sap_install.sap_maintain_etc_hosts
"{{ sap_ha_pacemaker_cluster_system_roles_collection }}.ha_cluster"
<< This is example from sap_ha_pacemaker_cluster role.The text was updated successfully, but these errors were encountered: