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/action
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
..
__init__.py win_copy: Add force parameter and check-mode support (#20405) 2017-02-24 18:10:09 -08:00
add_host.py refactoring async 2017-02-06 19:32:00 -05:00
asa_config.py fix up asa shared module 2016-09-04 08:31:40 -04:00
asa_template.py Module util, template action and doc fragment for Cisco ASA 2016-06-01 20:57:30 +02:00
assemble.py refactoring async 2017-02-06 19:32:00 -05:00
assert.py Implements verbose always to assert action plugin module (#17654) 2016-09-20 10:52:21 -05:00
copy.py win_copy: Add force parameter and check-mode support (#20405) 2017-02-24 18:10:09 -08:00
debug.py Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423) 2016-09-06 22:54:17 -07:00
dellos6_config.py Renamed the Modules from dnos* -> dellos*, updated copyright, removed… (#17617) 2016-09-16 22:45:08 +01:00
dellos9_config.py Renamed the Modules from dnos* -> dellos*, updated copyright, removed… (#17617) 2016-09-16 22:45:08 +01:00
dellos10_config.py Renamed the Modules from dnos* -> dellos*, updated copyright, removed… (#17617) 2016-09-16 22:45:08 +01:00
eos.py roll up of eos fixes (#21629) 2017-02-19 08:46:14 -05:00
eos_config.py updates eos modules to use socket (#21197) 2017-02-13 20:22:10 -05:00
eos_template.py updates eos modules to use socket (#21197) 2017-02-13 20:22:10 -05:00
fail.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
fetch.py unified boolean function 2016-11-29 12:34:30 -05:00
group_by.py Do not set 'changed' to True when using group_by 2016-01-04 17:46:40 +01:00
include_vars.py added 'extensions' options to include_vars 2017-02-22 10:31:22 -05:00
ios.py maps ios provider ssh_keyfile to play_context (#21597) 2017-02-17 18:56:00 +00:00
ios_config.py updates ios modules to support persistent socket (#21258) 2017-02-13 15:22:14 +00:00
ios_template.py updates ios modules to support persistent socket (#21258) 2017-02-13 15:22:14 +00:00
iosxr.py Removes default kwarg in iosxr_argument_spec for timeout (#21569) 2017-02-17 15:59:24 +01:00
iosxr_config.py updates iosxr modules to support socket (#21231) 2017-02-15 10:47:02 -05:00
iosxr_template.py updates iosxr modules to support socket (#21231) 2017-02-15 10:47:02 -05:00
junos.py minor fixes to junos action (#21643) 2017-02-19 18:04:00 -05:00
junos_config.py refactors junos modules to support persistent socket connections (#21365) 2017-02-16 10:53:03 -05:00
junos_template.py refactors junos modules to support persistent socket connections (#21365) 2017-02-16 10:53:03 -05:00
net_config.py code clean of old code from network modules updates (#21469) 2017-02-15 12:46:30 -05:00
net_template.py code clean of old code from network modules updates (#21469) 2017-02-15 12:46:30 -05:00
normal.py Complete rewrite of Windows exec wrapper (#21510) 2017-02-17 00:09:56 -08:00
nxos.py fixes import statement in nxos_facts module (#21834) 2017-02-23 13:00:34 +00:00
nxos_config.py refactors nxos module to use persistent connections (#21470) 2017-02-15 11:43:09 -05:00
nxos_template.py refactors nxos module to use persistent connections (#21470) 2017-02-15 11:43:09 -05:00
ops_config.py minor bug fixes in openswitch shared module 2016-08-30 23:04:41 -04:00
ops_template.py Migrate basestring to a python3 compatible type (#17199) 2016-08-23 13:13:44 -07:00
package.py refactoring async 2017-02-06 19:32:00 -05:00
patch.py refactoring async 2017-02-06 19:32:00 -05:00
pause.py if seconds are specified, min is 1 2016-06-27 09:36:15 -04:00
raw.py raw now returns changed: true (#17112) 2016-08-16 20:39:23 -07:00
script.py Complete rewrite of Windows exec wrapper (#21510) 2017-02-17 00:09:56 -08:00
service.py service: deprecate state=running (#21499) 2017-02-20 09:34:52 -05:00
set_fact.py unified boolean function 2016-11-29 12:34:30 -05:00
set_stats.py allow modules to set custom stats (#18946) 2017-01-05 16:38:36 -05:00
sros_config.py initial add of shared modules for supporting Nokia SROS devices 2016-08-25 11:47:00 -04:00
synchronize.py Don't use rsync-path in synchronize with docker 2017-01-11 14:01:11 -08:00
template.py refactoring async 2017-02-06 19:32:00 -05:00
unarchive.py refactoring async 2017-02-06 19:32:00 -05:00
vyos.py roll up of vyos action fixes (#21642) 2017-02-19 17:37:16 -05:00
vyos_config.py updates vyos modules to use socket connection (#21228) 2017-02-13 10:41:22 -05:00
win_copy.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00
win_reboot.py ensure win_reboot warnings value is a list 2017-01-16 14:28:18 -08:00
win_template.py Two fixes to action plugins 2015-10-22 16:07:26 -07:00