I eventually managed to contact the tuto's author who gave the response : 

Just replace

--become-method=su

by

--become-method=sudo


Le vendredi 7 mai 2021 à 11:40:01 UTC+2, Lomic Legone a écrit :

> Hi all, I'm a newbee on ansible and I follow online tutos.
>
> I installed 2 ubuntu VM (named ubunt1 and ubunt2), one as node manager 
> (ubuntu1) and the second one as simple node (ubuntu2). The ssh connection 
> is tested and ok.
>
> When I installed ubuntu, I've never been asked for a root password, but 
> only for the name/password for a simple user. But this user belongs to 
> sudoers group so it can make admin tasks. So all is ok.
>
> The pb is that as I try to execute root tasks from ubuntu1 to ubuntu2 with 
> ansible, even if ubuntu2 user belongs to sudoers groups, ansible fails. And 
> if I use the "-become" option, ansible asks me the ubuntu2 root password 
> that I don't know of course.
>
> In fact I feel that the fact that ubuntu2 user has sudo privilege is 
> useless.
>
> So how to do ?
>
> Thanks for your responses.
>

-- 
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/b6684836-bd31-4329-89f9-72818b4a2a07n%40googlegroups.com.

Reply via email to