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
ca941ec6
Commit
ca941ec6
authored
Aug 03, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style cleanup because -ECANNOTUNDERSTAND without it
parent
f86245dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
lib/ansible/plugins/action/synchronize.py
+12
-18
No files found.
lib/ansible/plugins/action/synchronize.py
View file @
ca941ec6
...
...
@@ -42,33 +42,27 @@ class ActionModule(ActionBase):
def
_process_origin
(
self
,
host
,
path
,
user
):
if
not
host
in
[
'127.0.0.1'
,
'localhost'
]
:
if
host
not
in
(
'127.0.0.1'
,
'localhost'
,
'::1'
)
:
if
user
:
return
'
%
s@
%
s:
%
s'
%
(
user
,
host
,
path
)
else
:
return
'
%
s:
%
s'
%
(
host
,
path
)
else
:
if
not
':'
in
path
:
if
not
path
.
startswith
(
'/'
):
path
=
self
.
_get_absolute_path
(
path
=
path
)
return
path
if
':'
not
in
path
and
not
path
.
startswith
(
'/'
):
path
=
self
.
_get_absolute_path
(
path
=
path
)
return
path
def
_process_remote
(
self
,
host
,
path
,
user
):
transport
=
self
.
_play_context
.
connection
return_data
=
None
if
not
host
in
[
'127.0.0.1'
,
'localhost'
]
or
transport
!=
"local"
:
if
host
not
in
(
'127.0.0.1'
,
'localhost'
,
'::1'
)
or
transport
!=
"local"
:
if
user
:
return
_data
=
'
%
s@
%
s:
%
s'
%
(
user
,
host
,
path
)
return
'
%
s@
%
s:
%
s'
%
(
user
,
host
,
path
)
else
:
return_data
=
'
%
s:
%
s'
%
(
host
,
path
)
else
:
return_data
=
path
if
not
':'
in
return_data
:
if
not
return_data
.
startswith
(
'/'
):
return_data
=
self
.
_get_absolute_path
(
path
=
return_data
)
return
'
%
s:
%
s'
%
(
host
,
path
)
return
return_data
if
':'
not
in
path
and
not
path
.
startswith
(
'/'
):
path
=
self
.
_get_absolute_path
(
path
=
path
)
return
path
def
_override_module_replaced_vars
(
self
,
task_vars
):
""" Some vars are substituted into the modules. Have to make sure
...
...
@@ -135,7 +129,7 @@ class ActionModule(ActionBase):
# COMPARE DELEGATE, HOST AND TRANSPORT
process_args
=
False
if
not
dest_host
is
src_host
and
original_transport
!=
'local'
:
if
dest_host
!=
src_host
and
original_transport
!=
'local'
:
# interpret and task_vars remote host info into src or dest
process_args
=
True
...
...
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