You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test
David Shrewsbury 0ae4dac65a
Fix copy module file perms with remote_src (#69993)
When using 'remote_src: yes' and 'mode: preserve', the code handling
the file modes has to be handled on the remote node because it's
the one that has access to the source files. This means that the
copy module itself must handle this, rather than the copy action
plugin (which is where all that logic exists). The copy module
handles this when we copy a single file over. But when it is a
directory as the src parameter value, the mode of the files
beneath it are not considered. Subdirectories are copied with
shutil.copytree() which will preserve permissions automatically.
Individual files are copied with shutil.copyfile() which does NOT
preserve permissions. We need to add some calls to shutil.copymode()
to correct that.

Note: This *always* retains individial file permissions. Specifying
a 'mode' other than 'preserve' when giving a source directory for
the 'src' param does not make sense so will be ignored in that case
only.

Fixes #69783

* Add changelog and test
6 years ago
..
ansible_test Relocate ansible-test self tests outside package. (#61255) 6 years ago
integration Fix copy module file perms with remote_src (#69993) 6 years ago
lib/ansible_test Fix changelog sanity test config detection. 6 years ago
sanity Use antsibull-changelog instead of packaged changelog generator (#69313) 6 years ago
support Deprecation revisited (#69926) 6 years ago
units config: singular ANSIBLE_COLLECTIONS_PATH (#70007) 6 years ago
utils/shippable Use antsibull-changelog instead of packaged changelog generator (#69313) 6 years ago