sudo: True has no effect
This is a configuration issue; hoping someone can spot my mistake.
Tested against Ansible versions: 1.4.5, 1.5.0 through 1.5.4, and devel branch; so I’m quite certain it is not an ansible issue.
Host OS: Ubuntu 12.04.4 fully patched
both ssh and sudo are passwordless
cat /etc/sudoers.d/admin
jhughes ALL=(ALL) NOPASSWD:ALL
ansible.cfg changes from default
hostfile = /srv/ansible/playbook/hosts #NOTE: tested against two nodes, only one listed below for brevity.
sudo_user = jhughes
log_path = /var/log/ansible/ansible.log
private_key_file = /srv/ansible/playbook/files/ssl/id_rsa #NOTE: this matches the private key of jhughes
pipelining = True #NOTE: testing with pipelining on and off
Notice in the output below there is no reference to ‘sudo’. I’m expecting to see something similar to:
...'grolsch', u'/bin/sh -c \'sudo -k && sudo -H -S -p "[sudo via ansible, key=l...
Test playbook (below): test_sudo.yml
Invoked with:
-
ansible-playbook -vvvv playbook/test_sudo.yml
-
ansible-playbook -vvvv playbook/test_sudo.yml --sudo -K
file: test_sudo.yml
`