Skip to content

Commit

Permalink
automatic method to reboot if new deployment ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitrousoxide authored and j1mc committed Apr 18, 2023
1 parent ea6058d commit 1df97d2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions roles/layered_packages/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@

- debug:
msg: "A reboot is required to complete installation / removal of these packages"

- name: Query whether booted RPM-OSTree deployment is first deployment
shell: rpm-ostree status --json | jq -r .deployments[0].booted
register: booted

- name: Reboot if new deployement is ready.
reboot:
reboot_timeout: 300
become: yes
when:
- booted.stdout == "false"

0 comments on commit 1df97d2

Please sign in to comment.