From 5696ba6e75e69d434a689a20ed569110e5cc0301 Mon Sep 17 00:00:00 2001
From: "Simon Michnowicz (Monash University)"
 <smichnow@m3-mgmt2.massive.org.au>
Date: Wed, 11 Dec 2019 16:25:28 +1100
Subject: [PATCH] reboot of node occures only if a yum update has occured

Former-commit-id: be1dee4809d2f4a8cd4f72f1dffa450151a33222
---
 roles/upgrade-lustre/tasks/main.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/roles/upgrade-lustre/tasks/main.yml b/roles/upgrade-lustre/tasks/main.yml
index 00b23983..697d6893 100644
--- a/roles/upgrade-lustre/tasks/main.yml
+++ b/roles/upgrade-lustre/tasks/main.yml
@@ -9,8 +9,10 @@
     - kmod-lustre-client
   become: true
   become_user: root
+  register: update_done
 
-- name: Unconditionally reboot the machine with all defaults
+- name: reboot the machine if an upgrade occured
   reboot:
+  when: update_done.changed
   become: true
   become_user: root
-- 
GitLab