Merge pull request #12268 from jaingaurav/ipv6
Fix rsync connections to IPv6 addresses
This commit is contained in:
commit
8a7a37b535
1 changed files with 4 additions and 4 deletions
|
@ -48,9 +48,9 @@ class ActionModule(ActionBase):
|
||||||
|
|
||||||
if host not in C.LOCALHOST:
|
if host not in C.LOCALHOST:
|
||||||
if user:
|
if user:
|
||||||
return '%s@%s:%s' % (user, host, path)
|
return '%s@[%s]:%s' % (user, host, path)
|
||||||
else:
|
else:
|
||||||
return '%s:%s' % (host, path)
|
return '[%s]:%s' % (host, path)
|
||||||
|
|
||||||
if ':' not in path and not path.startswith('/'):
|
if ':' not in path and not path.startswith('/'):
|
||||||
path = self._get_absolute_path(path=path)
|
path = self._get_absolute_path(path=path)
|
||||||
|
@ -60,9 +60,9 @@ class ActionModule(ActionBase):
|
||||||
transport = self._play_context.connection
|
transport = self._play_context.connection
|
||||||
if host not in C.LOCALHOST or transport != "local":
|
if host not in C.LOCALHOST or transport != "local":
|
||||||
if user:
|
if user:
|
||||||
return '%s@%s:%s' % (user, host, path)
|
return '%s@[%s]:%s' % (user, host, path)
|
||||||
else:
|
else:
|
||||||
return '%s:%s' % (host, path)
|
return '[%s]:%s' % (host, path)
|
||||||
|
|
||||||
if ':' not in path and not path.startswith('/'):
|
if ':' not in path and not path.startswith('/'):
|
||||||
path = self._get_absolute_path(path=path)
|
path = self._get_absolute_path(path=path)
|
||||||
|
|
Loading…
Reference in a new issue