Add some sudo rules to nagios-checker so it can start doing restricted checks
This commit is contained in:
parent
4b626dc6be
commit
54a4f1539b
@ -22,6 +22,16 @@
|
|||||||
state: present
|
state: present
|
||||||
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKNavw28C0mKIQVRLQDW2aoovliU1XCGaenDhIMwumK/ Nagios monitoring"
|
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKNavw28C0mKIQVRLQDW2aoovliU1XCGaenDhIMwumK/ Nagios monitoring"
|
||||||
tags: [ nagios ]
|
tags: [ nagios ]
|
||||||
|
- name: assure nagios user sudo rule file
|
||||||
|
file: path=/etc/sudoers.d/50-nagios-checker mode=0750 owner=root group=root state=touch modification_time=preserve access_time=preserve
|
||||||
|
tags: [ nagios, sudo ]
|
||||||
|
- name: assure nagios user sudo rules
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/sudoers.d/50-nagios-checker
|
||||||
|
line: "nagios-checker ALL = (root) NOPASSWD: {{ item }}"
|
||||||
|
with_items:
|
||||||
|
- /usr/lib/nagios/plugins/check_disk
|
||||||
|
tags: [ nagios, sudo ]
|
||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
- name: disable nagios user when not tagged
|
- name: disable nagios user when not tagged
|
||||||
|
Loading…
Reference in New Issue
Block a user