Skip to content

Commit

Permalink
fix(preinstall_config): Fix no automatic reboot when kernel is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jhampson-dbre committed Jan 19, 2021
1 parent 2ccea26 commit 5b2222e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/preinstall_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apt:
update_cache: yes
upgrade: full
register: apt_out

- name: Check if reboot required
stat:
Expand All @@ -11,7 +12,7 @@

- name: Reboot if required to apply any updates
reboot:
when: pending_reboot.stat.exists
when: "'linux-image' in apt_out.stdout or pending_reboot.stat.exists"

- name: Install OS packages for remote management
apt:
Expand Down

0 comments on commit 5b2222e

Please sign in to comment.