Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
6e035a3e
Commit
6e035a3e
authored
Oct 10, 2015
by
Petr Mifek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move nested function test for ipv6 to top level in synchronize module.
parent
27f779a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/ansible/plugins/action/synchronize.py
+4
-4
No files found.
lib/ansible/plugins/action/synchronize.py
View file @
6e035a3e
...
...
@@ -44,17 +44,17 @@ class ActionModule(ActionBase):
return
path
def
_host_is_ipv6_address
(
self
,
host
):
return
':'
in
host
def
_format_rsync_rsh_target
(
self
,
host
,
path
,
user
):
''' formats rsync rsh target, escaping ipv6 addresses if needed '''
def
_needs_ipv6_brackets
(
host
):
return
':'
in
host
user_prefix
=
''
if
user
:
user_prefix
=
'
%
s@'
%
(
user
,
)
if
_needs_ipv6_bracket
s
(
host
):
if
self
.
_host_is_ipv6_addres
s
(
host
):
return
'[
%
s
%
s]:
%
s'
%
(
user_prefix
,
host
,
path
)
else
:
return
'
%
s
%
s:
%
s'
%
(
user_prefix
,
host
,
path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment