I need to know if there is a way to print information from an ansible playbook that doesn't cause ansible to automatically quote and escape the string. For instance, I'm using ansible to build a command that should be run separately from a different machine (ironic, i know, but necessary anyhow). Currently the output looks something like…
"command" = "run_me.sh \"with this argument\""
What I need is something like…
"command" = run_me.sh "with this argument"
or just…
run_me.sh "with this argument"
if possible, but I'm guessing that's asking too much.
I'm currently using set_fact to build the command and debug to print it.
Best Answer
You can either write your own stdout callback plugin or use some of this tricks:
Output: