Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Ansible - sudoers file [closed]

$
0
0

I'm attempting to add a custom permission (see below) set to the sudoers file (ubuntu) via ansible so I can automate the process for setting up an audit user across our linux servers.

user ALL=(root) /sbin/dmidecode,/usr/bin/fdisk -l,/usr/bin/multipath -ll,/usr/bin/dmsetup table *,/usr/bin/dmsetup ls,/sbin/lsof,/usr/bin/cat,/usr/bin/cut,/usr/sbin/lshw,/usr/bin/ls,/usr/bin/netstat,/usr/sbin/ss,/usr/bin/stat

I've seen some people recommend the below similar module:

- name: User Managment | Update sudoers file with permissions  ansible.builtin.lineinfile:    dest: /etc/sudoers    state: present    regexp: 

I'm new to anisble so still learning


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>