Merge "Sync grains before hosts update"
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 9e81415..b7c8b16 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -46,6 +46,8 @@
     salt.enforceState(master, 'I@linux:system', ['linux', 'openssh', 'ntp', 'rsyslog'])
     salt.enforceState(master, '*', ['salt.minion'], true, false, null, false, 60, 2)
     sleep(5)
+
+    salt.fullRefresh(master, "*")
     salt.runSaltProcessStep(master, '*', 'mine.update', [], null, true)
     salt.enforceState(master, '*', ['linux.network.host'])
 
@@ -83,6 +85,8 @@
     sleep(5)
     salt.enforceState(master, target, ['linux', 'openssh', 'ntp', 'rsyslog'])
     sleep(5)
+
+    salt.fullRefresh(master, target)
     salt.runSaltProcessStep(master, target, 'mine.update', [], null, true)
     salt.enforceState(master, target, ['linux.network.host'])
 }