I am implementing a new module for specific needs in my environment. I would like to print certain outputs (such as some variables
) by this module, similar as debug
module prints with msg
parameter, but in a more customized way.
AnsibleModule
class has fail_json()
method which accepts msg
argument to print on a failure, but I cannot find a way to print a message on success with exit_json()
I also don't know how builtin debug module works, found almost nothing except DOCUMENTATION
and EXAMPLES
in the module script.