What I would like to do it's like this debut output :
TASK [Get system] ******************************************************************************************************************************************************************************
task path: /home/user/playbooks/pb_banner.yml:24
<1.1.1.1> attempting to start connection
<1.1.1.1> using connection plugin network_cli
<1.1.1.1> local domain socket does not exist, starting it
<1.1.1.1> control socket path is /home/user/.ansible/pc/d7df86492e
<1.1.1.1> CUSTOM NETWORK_CLI MODULE
<1.1.1.1> <1.1.1.1> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: user on PORT 22 TO 1.1.1.1
<1.1.1.1> <1.1.1.1> ssh connection done, setting terminal
<1.1.1.1> <1.1.1.1> loaded terminal plugin for network_os fortios
<1.1.1.1> <1.1.1.1> loaded cliconf plugin for network_os fortios
<1.1.1.1> <1.1.1.1> Response received, triggered 'persistent_buffer_read_timeout' timer of 0.1 seconds
<1.1.1.1> <1.1.1.1> firing event: on_open_shell()
<1.1.1.1> prompt detected on device DEVICENAME # <<<<====
The last line is printed during the call of "on_open_shell" in the "terminal_plugins" (bellow, the source code), as you can see, I use "Display()".
def on_open_shell(self):
prompt = self._get_prompt()
if re.search("Press 'a' to accept", prompt):
self._exec_cli_command(b'a')
if prompt:
display.display('prompt detected on device ' + prompt)
And now I would like to have the same kind of log in the "debug mode (-vvvv)", but from a cliconf_plugin.
I dont want to like into a file.
I hope i'm clear :) thanks for your help !