Skip to content

Commit

Permalink
push bullet alert when RPI is not powered 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Jun 17, 2024
1 parent 784cacc commit ae141e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/ansible_openvpn/playbooks/fetch_rpi_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
ansible.builtin.debug:
msg: Raspberry Pi {{rpi_host.stdout}}
- name: Sends a link to a device
vars:
expected_string: '"powerInput": "PRESENT"'
community.general.pushbullet:
api_key: {{ pushbullet_api_key }}
device: Chrome
title: RPI is not powered
body: {{rpi_host.stdout}}
when: rpi_host.stdout.find('"powerInput": "PRESENT"') > -1
when: rpi_host.stdout.find({{expected_string}}) > -1

0 comments on commit ae141e9

Please sign in to comment.