Ansible: have sudo but no root
Well, you simply cannot execute /bin/sh
or /bin/bash
as your /etc/sudoers
shows. What you could do is change ansible's default shell to something else (variable executable
in ansible.conf
).
Since your sudo policy allows everything by default (does not seem like really secure to me), and I suppose ansible expects an sh-compatible shell, as a really dirty hack you could copy /bin/bash
to some other path/name and set the executable
variable accordingly (not tested).