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
adbca9d2
Commit
adbca9d2
authored
Jul 11, 2013
by
Timothy Appnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed identity key logic.
parent
9f170f57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
lib/ansible/runner/action_plugins/synchronize.py
+3
-4
library/network/synchronize
+5
-6
No files found.
lib/ansible/runner/action_plugins/synchronize.py
View file @
adbca9d2
...
...
@@ -77,12 +77,11 @@ class ActionModule(object):
if
not
dest_host
is
src_host
:
user
=
inject
.
get
(
'ansible_ssh_user'
,
self
.
runner
.
remote_user
)
# should we support ssh_password and ssh_port here??
options
[
'private_key'
]
=
\
private_key
=
\
inject
.
get
(
'ansible_ssh_private_key_file'
,
self
.
runner
.
private_key_file
)
if
not
private_key
is
None
:
options
[
'private_key'
]
=
private_key
src
=
self
.
_process_origin
(
src_host
,
src
,
user
)
dest
=
self
.
_process_origin
(
dest_host
,
dest
,
user
)
...
...
library/network/synchronize
View file @
adbca9d2
...
...
@@ -99,10 +99,6 @@ def main():
rsync
=
module
.
params
.
get
(
'local_rsync_path'
,
'rsync'
)
temp
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
not
private_key
and
(
'@'
in
dest
or
'@'
in
source
):
return
module
.
fail_json
(
msg
=
'A private key is required for remote connections.'
)
cmd
=
'
%
s --archive --delay-updates --compress'
%
rsync
if
verbosity
:
cmd
=
'
%
s -
%
s'
%
(
cmd
,
'v'
*
int
(
verbosity
))
...
...
@@ -112,8 +108,11 @@ def main():
cmd
=
cmd
+
' --temp-dir '
+
temp
if
module
.
boolean
(
delete
):
cmd
=
cmd
+
' --delete-after'
if
private_key
:
cmd
=
cmd
+
" --rsh '
%
s -i
%
s -o
%
s'"
%
(
'ssh'
,
private_key
,
if
private_key
is
None
:
private_key
=
''
else
:
private_key
=
'-i '
+
private_key
cmd
=
cmd
+
" --rsh '
%
s
%
s -o
%
s'"
%
(
'ssh'
,
private_key
,
'StrictHostKeyChecking=no'
)
# need ssh param
if
rsync_path
:
cmd
=
cmd
+
' --rsync-path '
+
rsync_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