Hi Guys
I was going over the noop.py plugin callbacks on github (see https://github.com/ansible/ansible/blob/devel/lib/ansible/callback_plugins/noop.py) and noticed there is no callback for a task’s changed status. Any reason for this ?
Regards
Hi Guys
I was going over the noop.py plugin callbacks on github (see https://github.com/ansible/ansible/blob/devel/lib/ansible/callback_plugins/noop.py) and noticed there is no callback for a task’s changed status. Any reason for this ?
Regards
" Any reason for this ?"
There’s always a reason
In this case, it’s unnecessary.
changed True/False is mixed in with the attributes of the return datastructure.
Thanks for the reply.
Okay; well, I am trying to build a plugin that will print the task’s stdout rather than just return “changed/ok”. I could register a variable and then debug: var=var but that becomes somewhat wearisome when tasks are abundant. The plan was to latch onto runner_on_changed or something but thats obviously not going to work with this revelation.
Do you know what I need to do in order to achieve this goal ?
Regards
All commands that return stdout do in fact show this when using “-v”.
I don’t think you’d need to write one.
We might be interested in a language feature for a “verbose: True” property on a task that forces verbosity if not already set.
I am aware of the -v argument but it is not very user friendly hence why I want to create the plugin which will format the output. A verbose module would be nice provided it allow for some form of formatting.
Yeah, patches for that would be welcome. I’m not sure how hard it would be, but I suspect not terrible.