From ef036fca767dda9a0b22d536af8d6dab06764775 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Tue, 15 Oct 2024 11:29:40 -0500 Subject: [PATCH] Remove nagios shit from autoreboot --- playbooks/tags_autoreboot.yml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/playbooks/tags_autoreboot.yml b/playbooks/tags_autoreboot.yml index f6add91..9e6f1ab 100755 --- a/playbooks/tags_autoreboot.yml +++ b/playbooks/tags_autoreboot.yml @@ -3,34 +3,11 @@ --- - hosts: tags_autoreboot gather_facts: no - module_defaults: - nagios: - author: Ansible - action: downtime - cmdfile: /data/nagios/var/rw/nagios.cmd - comment: "Ansible tags_autoreboot task" - host: "{{ inventory_hostname }}" - minutes: 10 serial: 1 tasks: - name: check for reboot-required ansible.builtin.stat: path=/var/run/reboot-required register: s - name: reboot - block: - - name: attempt to schedule downtime - block: - - name: register nagios host downtime - nagios: - service: host - delegate_to: vm-general-1.ashburn.mgmt.desu.ltd - - name: register nagios service downtime - nagios: - service: all - delegate_to: vm-general-1.ashburn.mgmt.desu.ltd - rescue: - - name: notify of failure to reboot - ansible.builtin.debug: msg="Miscellaneous failure when scheduling downtime" - - name: reboot - ansible.builtin.reboot: reboot_timeout=600 + ansible.builtin.reboot: reboot_timeout=600 when: s.stat.exists