ANSIBLE PERMISSIONS

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!!

Not all modules are wrappers to shell commands, specifically this
module is not using any commands, its using python code and system
calls, which you cannot create sudo entries for.