From 46a373f79713fdad5b47da5852cf6b1662d3dcf1 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Wed, 12 Dec 2012 04:43:49 +0000 Subject: [PATCH] notes for future expansion with nagios --- playbooks/host-reboot.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/playbooks/host-reboot.yml b/playbooks/host-reboot.yml index 91e855b7a6..60aff0cbe2 100644 --- a/playbooks/host-reboot.yml +++ b/playbooks/host-reboot.yml @@ -10,14 +10,17 @@ ignore_errors: True register: needsreboot + # ADDME tell nagios to be quiet + - name: reboot the host - action: command touch /tmp/would-reboot -#/sbin/reboot + action: command /sbin/reboot only_if: "'${needsreboot.stdout}'.find('yes') != -1" - name: wait for host to come back - up to 6 minutes local_action: wait_for host=${inventory_hostname} port=22 delay=10 timeout=420 only_if: "'${needsreboot.stdout}'.find('yes') != -1" + # ADDME give nagios the all clear +