Fixed working with keys in salt print result
Change-Id: I1b1436015d7cc033b4c5e0bca644736919240bd0
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 2bc6fb9..eebdf0c 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -283,12 +283,12 @@
resKey = k
}
resource = node[resKey]
- common.errorMsg("Checking resource: ${res}")
+ common.errorMsg("Checking resource: ${resource}")
if(!resource["result"] || (resource["result"] instanceof String && resource["result"] != "true")){
if (failOnError) {
- throw new Exception("Salt state on node ${nodeKey} failed: ${res}. State output: ${node}")
+ throw new Exception("Salt state on node ${nodeKey} failed: ${resource}. State output: ${node}")
} else {
- common.errorMsg("Salt state on node ${nodeKey} failed: ${res}. State output: ${node}")
+ common.errorMsg("Salt state on node ${nodeKey} failed: ${resource}. State output: ${node}")
}
}
}