From a0d1ae0a4a127c9da197b44b72d047aeb75ce945 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Sun, 18 Aug 2024 00:48:17 -0500 Subject: [PATCH] Remove nagios bullshit --- playbooks/tags_nagios.yml | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/playbooks/tags_nagios.yml b/playbooks/tags_nagios.yml index 32c80c7..8fa153d 100755 --- a/playbooks/tags_nagios.yml +++ b/playbooks/tags_nagios.yml @@ -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