moar culprits

pull/83871/head
Brian Coca 3 months ago
parent fb8df6a325
commit 00e37c81e5

@ -0,0 +1,3 @@
bugfixes:
- ssh and local connection plugins now attempt to preseve or keep strict file permissions on transfers.
- copy, assemble, unarchive and uri actions will not force executable permissions on files anymore.

@ -146,7 +146,7 @@ class ActionModule(ActionBase):
xfered = self._transfer_file(path, remote_path) xfered = self._transfer_file(path, remote_path)
# fix file permissions when the copy is done as a different user # fix file permissions when the copy is done as a different user
self._fixup_perms2((self._connection._shell.tmpdir, remote_path)) self._fixup_perms2((self._connection._shell.tmpdir, remote_path), execute=False)
new_module_args.update(dict(src=xfered,)) new_module_args.update(dict(src=xfered,))

@ -97,7 +97,7 @@ class ActionModule(ActionBase):
if not remote_src: if not remote_src:
# fix file permissions when the copy is done as a different user # fix file permissions when the copy is done as a different user
self._fixup_perms2((self._connection._shell.tmpdir, tmp_src)) self._fixup_perms2((self._connection._shell.tmpdir, tmp_src), execute=False)
new_module_args['src'] = tmp_src new_module_args['src'] = tmp_src
# execute the unarchive module now, with the updated args (using ansible.legacy prefix to eliminate collections # execute the unarchive module now, with the updated args (using ansible.legacy prefix to eliminate collections

@ -52,7 +52,7 @@ class ActionModule(ActionBase):
tmp_src = self._connection._shell.join_path(self._connection._shell.tmpdir, os.path.basename(src)) tmp_src = self._connection._shell.join_path(self._connection._shell.tmpdir, os.path.basename(src))
kwargs['src'] = tmp_src kwargs['src'] = tmp_src
self._transfer_file(src, tmp_src) self._transfer_file(src, tmp_src)
self._fixup_perms2((self._connection._shell.tmpdir, tmp_src)) self._fixup_perms2((self._connection._shell.tmpdir, tmp_src), execute=False)
elif body_format == 'form-multipart': elif body_format == 'form-multipart':
if not isinstance(body, Mapping): if not isinstance(body, Mapping):
raise AnsibleActionFail( raise AnsibleActionFail(

Loading…
Cancel
Save