1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/plugins
Dag Wieers 98934939af win_copy: Add force parameter and check-mode support (#20405)
* win_copy: Add force parameter and check-mode support

The rationale behind this is that if you're working with +3GB files,
creating the checksum takes a lot of time, which we can avoid by simply
testing if the file exists.

I also took the liberty to put the various parameters together. It
probably takes a (neglible) performance hit but makes the code a bit
easier to inspect/work with, as its closer to all other windows modules.

On a normal run, the action plugin does a local checksum of the source
and a remote checksum of the destination. And afterwards, the module
will do another remote checksum of the copied source, a remote checksum
of the original destination, and another remote checksum of the copied
destination.

On a very huge file (think 4GB) that means 5x reading the complete file
(if you have a large cache you may get away with it, otherwise you're
doomed !).

This patch will ensure with `force: no` that not checksums are being
performed.

* Moving presence check before remote checksum

* Adapted to wishes

* Even more performance improvements
2017-02-24 18:10:09 -08:00
..
action win_copy: Add force parameter and check-mode support (#20405) 2017-02-24 18:10:09 -08:00
cache Make BaseFileCache into an abstractbaseclass so it's a proper interface 2017-02-22 10:27:29 -05:00
callback Fix 'task name is not templated in retry callback' (add task_name property to TaskResult) (#21214) 2017-02-24 12:33:24 -05:00
connection PEP8 E712 fixes (#21916) 2017-02-24 16:49:43 -06:00
filter PEP8 E712 fixes (#21916) 2017-02-24 16:49:43 -06:00
lookup PEP8 E712 fixes (#21916) 2017-02-24 16:49:43 -06:00
shell Complete rewrite of Windows exec wrapper (#21510) 2017-02-17 00:09:56 -08:00
strategy Stash post-validated fields of the task in the TaskResult 2017-02-21 14:35:13 -06:00
terminal clean up of terminal plugins (#21549) 2017-02-17 10:00:23 -05:00
test restored 'results' filters 2016-10-13 13:21:40 -04:00
vars Making the switch to v2 2015-05-03 21:47:26 -05:00
__init__.py Graceful error message for abstract base classes in PluginLoader 2017-02-22 10:27:29 -05:00