How to add verbosity to ansible.runner.Runner ?

I am not yet using playbooks. Calling ansible.runner.Runner from python to run modules. How can I add verbosity (like using -vvvv when running ansible from shell) ?

Verbosity is actually increased by setting a variable in ansible.utils

Such as:

ansible.utils.VERBOSITY = 4

The value is the NUMBER representation of how many v’s you want to specify.

Thanks Matt.

I am trying to debug the copy module which I am using to transfer an image from linux to XP on virtualbox on the same host (for subsequent processing). I am using SSH, with ControlPersist, scp_if_ssh and pipelining turned on.

When I first copy the file, ~700KB, it takes ~3.5 secs. Subsequently, ie when the file exists in the target location, it takes ~1.2 secs.

I understand from debug logs that during the first copy operation, it does the copy. And during the overwrite operation, it doesn’t as mostly MD5 checksum says so. What I don’t understand is that scp of the same file, irrespective of copy or overwrite, takes < 1sec. Why does ansible take so long a time?

Any light on the functioning of the copy module is greatly appreciated. The only other method I have to overcome this induced delay is doing an scp.

After you reboot the XP in virtualbox and Linux (also under virtualbox?),
what happens to the transfer times when you do the scp first and the
Ansible copy second?

  -Greg

I tried this today after rebooting XP and the timing is the same – scp takes < 1 sec and ansible taking 1.2 sec, as I didn’t delete the already copied file. After I deleted, ansible took 3.5 secs.

I am on Linux host and running XP on virtualbox on the same Linux host.

Any idea why ansible takes 3.5 secs when it has to copy the file (sz: ~700KB) ?

-Ethan