diff --git a/roles/mellanox_drivers/tasks/main.yml b/roles/mellanox_drivers/tasks/main.yml
index 08380a354f5ea1d3040dec5bdd477da60065582d..b41e22788f8c1923d110024de897ad229a820de3 100644
--- a/roles/mellanox_drivers/tasks/main.yml
+++ b/roles/mellanox_drivers/tasks/main.yml
@@ -241,6 +241,14 @@
   become_user: root
   when: install_now and buildKMOD==True and ansible_os_family == "Debian"
 
+#
+# A REBOOT IS NEEDED AFTER SUCCESSFUL INSTALL
+#
+- name: restart machine
+  reboot:
+  become: true
+  when: reboot_now
+
 - name: stat if etc systemd system roce_mode.service exists
   stat:
     path: /etc/systemd/system/roce_mode.service
@@ -275,13 +283,6 @@
 - name: enable roce_mode setting
   service: name=roce_mode enabled=yes
   become: true
-#
-# A REBOOT IS NEEDED AFTER SUCCESSFUL INSTALL
-#
-- name: restart machine
-  reboot:
-  become: true
-  when: reboot_now
 
 - name: enable roce_mode setting
   service: name=roce_mode state=started enabled=yes