I've got a playbook where a couple of tasks are notifying a 'Reboot
server' handler when a lineinfile generates a change. I *also* want to
notify the same handler when the reboot-required file exists (this is on
Ubuntu). My brain is glitching as to how to get this done.
Essentially I have code:
---------------------
- name: Get reboot-required status
stat: path=/var/run/reboot-required
register: file_reboot_required
- name: trigger Server Reboot when reboot_required exists
# do something to cause notify to happen if reboot_required exists
notify: Reboot server
---------------------
What needs to replace the comment? What can I do with the
file_reboot_required variable that will result in 'Reboot server' being
notified when this file exists? Or should I be taking another approach?
I'm sure I'll have a forehead slap/"D'oh!" moment when this is answered,
but for the moment, my brain isn't going there.
Ben
--
Ben Coleman
olo...@benshome.net | For the wise man, doing right trumps
http://oloryn.benshome.net/ | looking right. For the fool, looking
Amateur Radio NJ8J | right trumps doing right.