Fix pretty print in salt states output
Change-Id: I3aac82c05a1c8cf806f388d9f18170ceed980567
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 2d3342c..dc58f0e 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -345,7 +345,7 @@
def node=out[nodeKey]
if (node) {
common.infoMsg("Node ${nodeKey} changes:")
- common.infoMsg(new groovy.json.JsonBuilder(node).toPrettyString().replace('\\n', System.getProperty('line.separator')))
+ print new groovy.json.JsonBuilder(node).toPrettyString().replace('\\n', System.getProperty('line.separator'))
} else {
common.infoMsg("No changes for node ${nodeKey}")
}
@@ -356,7 +356,7 @@
}
/**
- * Print Salt state run results in human-friendly form
+ * Print salt command run results in human-friendly form
*
* @param result Parsed response of Salt API
*/
@@ -395,7 +395,7 @@
def node = out[nodeKey]
if (node) {
common.infoMsg("Node ${nodeKey} changes:")
- print new groovy.json.JsonBuilder(node).toPrettyString()
+ print new groovy.json.JsonBuilder(node).toPrettyString().replace('\\n', System.getProperty('line.separator'))
} else {
common.infoMsg("No changes for node ${nodeKey}")
}