Hi,
The central IT function at my company allows developers root access to a server for a short period of time to allow us to install any required middelware and application software when we are commissioning a server. I’ve been looking at using Ansible to automate this process to prevent user errors and make the process more efficient. The problem that I’ve run into is that they only allow root access using the following sudo call:
sudo rootsh -i -u root
This uses a logging shell wrapper, rootsh (man page), to log all terminal input and output for audit purposes. We can’t change this and it means we can’t use any of the standard become_methods that Ansible uses.
Is there any way of adding a become_method to Ansible that would call the above command instead of just sudo? Alternatively, is there anyway of getting Ansible to run rootsh when it requests elevated privileges?
I did try the following in the vain hope that it might work, but as I feared, it failed:
site.yml:
`