mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add a directory walker to copy
* We need a directory walker that can handle symlinks, empty directories, and some other odd needs. This commit contains a directory walker that can do all that. The walker returns information about the files in the directories that we can then use to implement different strategies for copying the files to the remote machines. * Add local_follow parameter to copy that follows local symlinks (follow is for remote symlinks) * Refactor the copying of files out of run into its own method * Add new integration tests for copy Fixes #24949 Fixes #21513
This commit is contained in:
@@ -96,7 +96,14 @@ options:
|
||||
choices: [ "yes", "no" ]
|
||||
version_added: "1.8"
|
||||
description:
|
||||
- 'This flag indicates that filesystem links, if they exist, should be followed.'
|
||||
- 'This flag indicates that filesystem links in the destination, if they exist, should be followed.'
|
||||
local_follow:
|
||||
required: false
|
||||
default: "yes"
|
||||
choices: [ "yes", "no" ]
|
||||
version_added: "2.4"
|
||||
description:
|
||||
- 'This flag indicates that filesystem links in the source tree, if they exist, should be followed.'
|
||||
extends_documentation_fragment:
|
||||
- files
|
||||
- validate
|
||||
@@ -273,6 +280,7 @@ def main():
|
||||
validate = dict(required=False, type='str'),
|
||||
directory_mode = dict(required=False, type='raw'),
|
||||
remote_src = dict(required=False, type='bool'),
|
||||
local_follow = dict(required=False, type='bool'),
|
||||
),
|
||||
add_file_common_args=True,
|
||||
supports_check_mode=True,
|
||||
|
||||
Reference in New Issue
Block a user