« home

Human-Readable Ansible Playbook Log Output Using Callback Plugin

One problem I’ve had with Ansible playbook since its early 0.x days is with its verbose log output. Jsonified by default, it’s hard to read, and pretty much impossible for a human to review when its stdout or stderr contains tens/hundreds of lines combined into one lengthy string. Here’s how it looks like: changed: [gennou.local] => {"changed": true, "cmd": "/tmp/sample.sh", "delta": "0:00:00.019164", "end": "2014-03-30 21:05:33.994066", "rc": 0, "start": "2014-03-30 21:05:33.974902", "stderr": "", "stdout": "gazillion texts here with lots of \n in between gazillion texts here with lots of \n in between gazillion texts here with lots of \n in between gazillion texts here with lots \n in between"} When –verbose flag is set, I believe that the intention is for a human to eventually review the verbose log output.…


more »