On 2/9/20 5:21 PM, Poemy wrote:
> 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.

You can try

    become_flags: 'su -'

And please post the error message if it still fails.

Regards
         Racke

> 
> 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] 
> <mailto:[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
> <https://groups.google.com/d/msgid/ansible-project/0ad67b84-eb0d-48b2-af89-bf0db3f830e9%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/5eaf363d-7ba6-cb7c-1191-2d78a2337adc%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to