Hello!
I am trying to write an Ansible (2.1.x) module. In the module, I make calls to module.log(“some message”) (where module is an instance of ansible.module_utils.basic.AnsibleModule).
I am not able to find any way to get the logs.
F.ex. at the very beginning of my main, just after instantiating AnsibleModule, I have module.log(“I am here!”). I expected that by creating an ansible.cfg with
[defaults]
log_path=ansible.log
I will get this message in the log file - but I do not (though it has task name and output logs). Perhaps that is because the module runs on another machine?
What can I do to get logs from the module, so that I can find out what is it having troubles with?
Thanks a lot!
Cheers, Jakub Holy