more dns-ification work
diff --git a/roles/common-prep/tasks/main.yml b/roles/common-prep/tasks/main.yml
index bf1c116..1ea1ad9 100644
--- a/roles/common-prep/tasks/main.yml
+++ b/roles/common-prep/tasks/main.yml
@@ -2,10 +2,18 @@
# file: roles/common-prep/tasks/main.yml
- name: Upgrade system to current using apt
- apt:
+ apt:
upgrade=dist
- update_cache=yes
+ update_cache=yes
cache_valid_time=3600
+
+- stat:
+ path=/var/run/reboot-required
+ register: reboot-required
+
+- name: reboot if required
+ when: reboot-required.exists is defined
+ debug: msg="System will reboot"
notify:
- restart host
- wait for host