Le 15/01/2021 à 06:08, Ramakrishna Veeragandham a écrit :

Hi Ansible team,

I am Ram.  We need some help in running the Ansible playbook ( specifically how to add sudo while running playbooks ).  in your environment, we can run all admin related commands with sudo acess (  by adding sudo in front of command . For example, sudo vgs or sudo vi /etc/sudoers ). We don't have root access and hence we don't wanted to run the playbooks with direct root access .

Most of our servers ( Redhat / Solaris / Aix ) doesn't have root access. The possibility of running all admin activities are by running sudo <command>  as admin ( sysunx ) user.

Hi,

Ansible is designed to have all sudo (or su) access (but not remote root acess to be more specific)....So you should be sure thats is no way to have it !

See "Privilege escalation must be general <https://docs.ansible.com/ansible/latest/user_guide/become.html#id9>" on https://docs.ansible.com/ansible/latest/user_guide/become.html#only-one-method-may-be-enabled-per-host

If not, you can still use the same command you already use with "sudo command" with the shell module (using become: no)... but's ugly and you loose idempotence work of all the module (except shell) that are provided by ansible community


Regards,

JYL

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/051e75c1-24ef-6722-a4aa-aaa13fc28b60%40lenhof.eu.org.

Reply via email to