Remove nagios bullshit
This commit is contained in:
parent
760af8dabe
commit
a0d1ae0a4a
@ -11,29 +11,11 @@
|
||||
dest: /usr/local/bin/monitoring-scripts
|
||||
tags: [ nagios, git ]
|
||||
tasks:
|
||||
- name: assure nagios plugin packages
|
||||
ansible.builtin.apt: name=monitoring-plugins,nagios-plugins-contrib
|
||||
tags: [ nagios ]
|
||||
- name: assure nagios user
|
||||
ansible.builtin.user: name=nagios-checker state=present system=yes
|
||||
tags: [ nagios ]
|
||||
- name: assure nagios user ssh key
|
||||
authorized_key:
|
||||
user: nagios-checker
|
||||
state: present
|
||||
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKNavw28C0mKIQVRLQDW2aoovliU1XCGaenDhIMwumK/ Nagios monitoring"
|
||||
ansible.builtin.user: name=nagios-checker state=absent remove=yes
|
||||
tags: [ nagios ]
|
||||
- name: assure nagios user sudo rule file
|
||||
ansible.builtin.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
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sudoers.d/50-nagios-checker
|
||||
line: "nagios-checker ALL = (root) NOPASSWD: {{ item }}"
|
||||
with_items:
|
||||
- /usr/lib/nagios/plugins/check_disk
|
||||
- /usr/local/bin/monitoring-scripts/check_docker
|
||||
- /usr/local/bin/monitoring-scripts/check_temp
|
||||
ansible.builtin.file: path=/etc/sudoers.d/50-nagios-checker state=absent
|
||||
tags: [ nagios, sudo ]
|
||||
- name: assure prometheus node exporter
|
||||
# https://github.com/prometheus/node_exporter
|
||||
|
Loading…
Reference in New Issue
Block a user