Hello,
I’m very puzzled
I run usually all my playbooks with a user (user_sys) having full no passwd sudo privileges .
Now for the deployment of app I wanted to use the a user (user_adm) having sudo privileges only to what it is actually doing .
Since the inventory file is setting ansible_ssh_user to the user_sys, in the deployment playbook I’v specified ansible_ssh_user: user_adm
Problem arise very early on with the fact gathering where i’m getting a “Missing sudo password” error message. After disabling that, I’m getting a more "“Missing sudo password” on a shell command that can be run by user_adm.
But it looks like ansible is doing sudo -u root /bin/sh -c <ansible_shell>. Of course user_adm can’t sudo run a shell as root. I just want to sudo the actual commands …
I’m I stuck here ? Or missing something big ?
Thanks for you help
Alain