It's the only way and there won't be a change in the process soon, so I need to deal with it. They provide me a VM with a login, where I only can have root access to login with the command *dzdo su -* for 1 week to prepare the VM for real usage. I use this temporary dzdo root access to install sudo for further usage. To automate this process I need to write an ansible playbook. And I tried to use *become_method=dzdo *but this fails during the run of the playbook. I think because I still need to specify the *su - *part of it.
Thanks Op vrijdag 7 februari 2020 22:35:47 UTC+1 schreef James Cassell: > > > On Fri, Feb 7, 2020, at 5:45 AM, Poemy wrote: > > I have an ansible playblook running some tasks for my user, which I log > > in through ssh. > > > > The user has root privileges by running following command in the > terminal: > > ` > > dzdo su - > > ` > > > > It's actually the only way (no sudo, no root password) to get root > access. > > > > Now, what I want to do is to switch my user to root at a certain point > > in my ansible-playbook, using this *dzdo su -* behavior. > > > > How to do this? > > > > Use become_method=dzdo > > If they literally require you to type "dzdo su -", then you should talk to > your security folks to get a saner policy. (There's likely hacks that can > be done, but "hacks") > > V/r, > James Cassell > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0ad67b84-eb0d-48b2-af89-bf0db3f830e9%40googlegroups.com.
