Skip to content

Commit

Permalink
Add new role reboot-if-required.
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-schlichtherle committed Oct 30, 2022
1 parent b4c7e3b commit b78287e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/reboot-if-required/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: check if reboot required
stat:
path: /var/run/reboot-required
register: reboot_required
- name: reboot if required
reboot: { }
when: reboot_required.stat.exists
1 change: 1 addition & 0 deletions up.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- debian
roles:
- debian-up
- reboot-if-required
- hosts:
- raspberry_pi_os
roles:
Expand Down

0 comments on commit b78287e

Please sign in to comment.