I like to use Ansible to manage our Hadoop cluster configuration (Red Hat works).
I have sudo access and I can manually ssh in the nodes to execute commands. However, I am having problems when I try to run Ansible modules to perform the same tasks. Although I have access to sudo , I cannot become root. When I try to run Ansible scripts that require elevated privileges, I get the following:
Sorry, awoolford is not allowed to execute '/ bin / bash -c echo BECOME-SUCCESS- [...] / usr / bin / python / tmp / ansible -tmp-1446662360.01-231435525506280 / copy' as awoolford on [Some_hadoop_node].
Looking through the documentation , I thought that the become_allow_same_user property could resolve this, and so I added after ansible.cfg :
[privilege_escalation] become_allow_same_user=yes
Unfortunately, this did not work.
This post assumes that I need permissions for sudo /bin/sh (or some other shell). Unfortunately, this is not possible for security reasons. Here's a snippet from /etc/sudoers :
root ALL=(ALL) ALL awoolford ALL=(ALL) ALL, !SU, !SHELLS, !RESTRICT
Can Ansible work in such an environment? If so, what am I doing wrong?
redhat ansible ansible-playbook
Alex woolford
source share