I wrote a playbook that allows a local user to use ansible “LINEINFILE” module to edit /etc/sssd/sssd.conf and /etc/fstab. However I gave that local user to run all sudo commands without password.
I want to limit the local user and only give specific permissions in the /etc/sudoers file. . I want to know what LINUX command is actually being used when we run LINEINFILE OR INSERTALINEINFILE ansible module.
an example of my playbook is as follows.
- name: Editing sssd.conf file
lineinfile:
path: /etc/sssd/sssd.conf
line: sudo_provider = ldap
Thank You!!