Writing a custom become plugin

bvx54
Mon, 09 Dec 2024 11:21:02 +0000
Get Help

where do i get assistance on writing become plugins?
There’s very little info on how to get started, debug, what all the stuff means etc.
I had to end up reading the entire SSH/su/init/become code to work it all out for my self… sadly

currently have a situation where i can only run ´sudo su -´ and then a password entered after the prompt.

the standard ansible “become” functionality doesnt support this.

I’ve had a look in the community plugins and nothing there works either. the sudosu become plugin comes close but that one runs
´sudo su - ´ whereas my terminal session is only allowed to do do sudo su -

I found this excellent example of a user that runs just sudo su - then pipes in the second command, but this user had passwordless sudo, and hence hasnt coded in a prompt.

im using the example above, but when i add a prompt in, i can see the prompt coming up in the log, but the become machinery doesnt seem to match the prompt, and hence doenst send in the become password…

8 posts - 4 participants