unable to configure ansible properly - sudo: True has no effect on any task

73 views
Skip to first unread message

Joel Hughes

unread,
Apr 13, 2014, 1:53:18 AM4/13/14
to ansible...@googlegroups.com
sudo: True has no effect on any task
This is a configuration issue, but after many hours I'm unable to locate it. 

Tested against ansible 1.4.5, 1.5.0 through 1.5.4 and development branch so I'm sure it's not ansible. 
Hosts: Ubuntu 12.04.4 fully patched.
ssh and sudo both passwordless

cat /etc/sudoers.d/admin
jhughes ALL=(ALL) NOPASSWD:ALL

ansible.cfg delta
hostfile      

Brice Burgess

unread,
Apr 17, 2014, 1:06:05 PM4/17/14
to ansible...@googlegroups.com
Joel,

Did you try adding `sudo_user: jhughes` to the task?

Adam Morris

unread,
Apr 17, 2014, 2:41:12 PM4/17/14
to ansible...@googlegroups.com
That would cause it to run sudo to become jhughes before running the command. 

Probably not what is wanted.

I'm not sure what you're expecting differently...  Are you getting errors?

What are the errors?  What are the tasks?  

Adam

Michael DeHaan

unread,
Apr 17, 2014, 6:17:11 PM4/17/14
to ansible...@googlegroups.com
Ansible does know that if logging in as foo and sudo'ing to foo, it's smart enough to avoid doing the sudo at all.

This has been a point of contention with one user's SELinux environment where logging in as root didn't get full privs until sudoing, at which point it was proposed a setting to control this behavior.

That all being said, I'm not sure this is what you were seeing, but it can explain scenarios when ansible ignores a sudo statement.

Otherwise, sudo: True is functional, and we'd need to see more detail.


--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f4f4e6ad-7c6f-41b1-9fe9-c4eeb5f8ef8e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Joel Hughes

unread,
Apr 17, 2014, 11:46:22 PM4/17/14
to ansible...@googlegroups.com
Please see post: request help with configuration issue: 'sudo: True' has no effect which has been resolved. 
This post was accidentally sent before completed. 
Reply all
Reply to author
Forward
0 new messages