Missing sudo password

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

Please read the explanation about sudo in the first “note” section under

http://docs.ansible.com/intro_adhoc.html#id8

Okay, use tower. I’ll check it out.

Thanks for your answer and congrats for the 1st Ansible Fest.

Cheers

Alain

Nah, it wasn’t a “use tower” note so much as a “individual commands can’t be restricted with sudo” note.

Ansible just doesn’t do that.

Restricting sudo to not be able to run the “command” module would be super limiting anyway.