print warning when state step fails
We will raise expection later.
Change-Id: I0a7bddd21be9febcd67c0f97af1ee77e07a318a4
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 925abe9..5151566 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -214,6 +214,7 @@
* parsing
*/
def printSaltStateResult(result, onlyChanges = true) {
+ def common = new com.mirantis.mk.Common()
def out = [:]
for (entry in result['return']) {
for (node in entry) {
@@ -223,6 +224,10 @@
out[node.key] = node.value
} else if (resource.value.result.toString().toBoolean() == false || resource.value.changes || onlyChanges == false) {
out[node.key][resource.key] = resource.value
+
+ if (resource.value.result.toString().toBoolean() == false) {
+ common.warningMsg("Resource ${resource.key} failed on node ${node.key}!")
+ }
}
}
}