mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 04:11:25 -07:00
Group logic detecting user, ensure rsync_opts is a list if omitted. Fixes #40483
This commit is contained in:
parent
28f19fc7b3
commit
ea176427b4
2 changed files with 2 additions and 2 deletions
|
@ -366,7 +366,7 @@ def main():
|
||||||
group=dict(type='bool'),
|
group=dict(type='bool'),
|
||||||
set_remote_user=dict(type='bool', default=True),
|
set_remote_user=dict(type='bool', default=True),
|
||||||
rsync_timeout=dict(type='int', default=0),
|
rsync_timeout=dict(type='int', default=0),
|
||||||
rsync_opts=dict(type='list'),
|
rsync_opts=dict(type='list', default=[]),
|
||||||
ssh_args=dict(type='str'),
|
ssh_args=dict(type='str'),
|
||||||
partial=dict(type='bool', default=False),
|
partial=dict(type='bool', default=False),
|
||||||
verify_host=dict(type='bool', default=False),
|
verify_host=dict(type='bool', default=False),
|
||||||
|
|
|
@ -583,7 +583,7 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
||||||
expand_path = '~%s' % self._play_context.become_user
|
expand_path = '~%s' % self._play_context.become_user
|
||||||
else:
|
else:
|
||||||
# use remote user instead, if none set default to current user
|
# use remote user instead, if none set default to current user
|
||||||
expand_path = '~%s' % self._play_context.remote_user or self._connection.default_user or ''
|
expand_path = '~%s' % (self._play_context.remote_user or self._connection.default_user or '')
|
||||||
|
|
||||||
# use shell to construct appropriate command and execute
|
# use shell to construct appropriate command and execute
|
||||||
cmd = self._connection._shell.expand_user(expand_path)
|
cmd = self._connection._shell.expand_user(expand_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue