synchronize: Use private_key and ssh_user with delegate_to (Fixes #16215) (#21686)

This commit is contained in:
Nicolas Porcel 2017-08-25 03:09:15 +02:00 committed by Martin Krizek
parent 7d8a4b13a5
commit ba420c47cd
4 changed files with 5 additions and 4 deletions

View file

@ -467,7 +467,7 @@ def main():
if is_rsh_needed(source, dest):
ssh_cmd = [module.get_bin_path('ssh', required=True), '-S', 'none']
if private_key is not None:
ssh_cmd.extend(['-i', private_key])
ssh_cmd.extend(['-i', os.path.expanduser(private_key) ])
# If the user specified a port value
# Note: The action plugin takes care of setting this to a port from
# inventory if the user didn't specify an explicit dest_port