notify on file existence?

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:

<quote voice="Gilda Radnor">Never mind</quote>

A breather, a better specified Google, and I"ve found what I need.

Looks like what I want is more like this:

    - name: check if a reboot is required
      shell: "[ -f /var/run/reboot-required ]"
      failed_when: False
      register: reboot_required
      changed_when: reboot_required.rc == 0
      notify: reboot

Ben

Though this is more efficient and easier to understand:

  - name: Get reboot-required status
    stat: path=/var/run/reboot-required
    register: file_reboot_required
    changed_when: file_reboot_required.stat.exists
    notify: reboot

Regards
          Racke