Skip to content

sap_hostagent: unexpected become removal #1062

@crysaki

Description

@crysaki

Ansible Role

sap_hostagent

OS Family

RHEL

Ansible Controller - Python version

3.9.18

Ansible-core version

2.14.14

Bug Description

Since the last release of this collection the collection the ansible_become: true is removed from the role.
The installation of the SAP Host Agent has to be done with user root, so at least the task Install SAPHOSTAGENT has always to be executed with privilege.

We have the role included in big playbooks with the sar_remote option. Unfortunately the role is not idempotent so it does not determine if an agent is already installed and always extracts the SAR.
So we check if we already have an Agent on the host and do a dynamic include of the role to reduce the runtime.
But since the default become was removed from the role this is not possible anymore (Took us some time to find the change in the role).

So would it possible to add become to specific task within the role or do you won't do that, so everybody has to do a privileged static import of the role?

Bug reproduction

Include the role to a playbook.

Community participation

Happy to implement this bug fix

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions