Skip to content

Commit

Permalink
perf(preinstall_config): Use full-upgrade option for initial OS upd…
Browse files Browse the repository at this point in the history
…ates and automatically reboot if needed
  • Loading branch information
jhampson-dbre committed Jan 19, 2021
1 parent 3a64cf7 commit 2ccea26
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion roles/preinstall_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
- name: Ensure OS is up to date
apt:
update_cache: yes
upgrade: safe
upgrade: full

- name: Check if reboot required
stat:
path: /var/run/reboot-required
register: pending_reboot

- name: Reboot if required to apply any updates
reboot:
when: pending_reboot.stat.exists

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

0 comments on commit 2ccea26

Please sign in to comment.