summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/action
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2021-08-03 16:08:52 -0400
committerGitHub <noreply@github.com>2021-08-03 15:08:52 -0500
commitb866d6f7085a20c0d2c9eb548f8a61c70c6bd1de (patch)
tree087758810d198105fc672886f3513efb196fab89 /lib/ansible/plugins/action
parent66ca0abaf478473fd65750f439757d61b567efc4 (diff)
downloadansible-b866d6f7085a20c0d2c9eb548f8a61c70c6bd1de.tar.gz
fix: action _fixup_perms2 macos +a remote_paths in list() as it can be a tuple (#74613) (#75336)
* fix: action _fixup_perms2 macos +a remote_paths in list() as it can be tuple in `lib/ansible/plugin/action/__init__.py`'s `_fixup_perms2`, `remote_paths` can be a list or tuple. however, the macos specific attempt to use chmod +a attempts to concatenate `remote_paths` with a list, which will fail if it is a tuple. wrapping `remote_paths` in `list()` fixes this error. * Update changelogs/fragments/74613-actionfixup_perms2_macos_remote_paths_ensure_list.yml Co-authored-by: Rick Elrod <rick@elrod.me> (cherry picked from commit df6554c4ec8b1256067bc2510134ac49cfc3003c) Co-authored-by: Shane St Savage <shane@axiomdatascience.com>
Diffstat (limited to 'lib/ansible/plugins/action')
-rw-r--r--lib/ansible/plugins/action/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py
index 12ce3b0b45..fab8689c1a 100644
--- a/lib/ansible/plugins/action/__init__.py
+++ b/lib/ansible/plugins/action/__init__.py
@@ -630,7 +630,7 @@ class ActionBase(with_metaclass(ABCMeta, object)):
# pass that argument as the first element of remote_paths. So we end
# up running `chmod +a [that argument] [file 1] [file 2] ...`
try:
- res = self._remote_chmod([chmod_acl_mode] + remote_paths, '+a')
+ res = self._remote_chmod([chmod_acl_mode] + list(remote_paths), '+a')
except AnsibleAuthenticationFailure as e:
# Solaris-based chmod will return 5 when it sees an invalid mode,
# and +a is invalid there. Because it returns 5, which is the same