Improved output of salt errors
Change-Id: Id320294ce4edb87f109ac48cb5c20d8b66dc7517
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 0601f77..11d8ed6 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -350,8 +350,10 @@
input message: "False result on ${nodeKey} found, resource ${prettyResource}. \nDo you want to continue?"
}
}else{
- print(String.format("Resource: %s\n\u001B[33m%s\u001B[0m", resKey, prettyResource))
- def errorMsg = "Salt state on node ${nodeKey} failed: ${prettyResource}. State output: ${node}"
+ wrap([$class: 'AnsiColorBuildWrapper']) {
+ print(String.format("Resource: %s\n\u001B[33m%s\u001B[0m", resKey, prettyResource))
+ }
+ def errorMsg = "Salt state on node ${nodeKey} failed: ${prettyResource}."
if (failOnError) {
throw new Exception(errorMsg)
} else {