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
30678e04
Commit
30678e04
authored
Nov 22, 2013
by
Aleksey Ovcharenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make tests happy
parent
2222f6df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
lib/ansible/runner/__init__.py
+8
-1
lib/ansible/runner/action_plugins/synchronize.py
+3
-1
No files found.
lib/ansible/runner/__init__.py
View file @
30678e04
...
@@ -584,9 +584,12 @@ class Runner(object):
...
@@ -584,9 +584,12 @@ class Runner(object):
actual_user
=
inject
.
get
(
'ansible_ssh_user'
,
self
.
remote_user
)
actual_user
=
inject
.
get
(
'ansible_ssh_user'
,
self
.
remote_user
)
actual_pass
=
inject
.
get
(
'ansible_ssh_pass'
,
self
.
remote_pass
)
actual_pass
=
inject
.
get
(
'ansible_ssh_pass'
,
self
.
remote_pass
)
actual_transport
=
inject
.
get
(
'ansible_connection'
,
self
.
transport
)
actual_transport
=
inject
.
get
(
'ansible_connection'
,
self
.
transport
)
actual_private_key_file
=
os
.
path
.
expanduser
(
inject
.
get
(
'ansible_ssh_private_key_file'
,
self
.
private_key_file
)
)
actual_private_key_file
=
inject
.
get
(
'ansible_ssh_private_key_file'
,
self
.
private_key_file
)
self
.
sudo_pass
=
inject
.
get
(
'ansible_sudo_pass'
,
self
.
sudo_pass
)
self
.
sudo_pass
=
inject
.
get
(
'ansible_sudo_pass'
,
self
.
sudo_pass
)
if
actual_private_key_file
is
not
None
:
actual_private_key_file
=
os
.
path
.
expanduser
(
actual_private_key_file
)
if
self
.
accelerate
and
actual_transport
!=
'local'
:
if
self
.
accelerate
and
actual_transport
!=
'local'
:
#Fix to get the inventory name of the host to accelerate plugin
#Fix to get the inventory name of the host to accelerate plugin
if
inject
.
get
(
'ansible_ssh_host'
,
None
):
if
inject
.
get
(
'ansible_ssh_host'
,
None
):
...
@@ -626,6 +629,10 @@ class Runner(object):
...
@@ -626,6 +629,10 @@ class Runner(object):
actual_private_key_file
=
os
.
path
.
expanduser
(
delegate_info
.
get
(
'ansible_ssh_private_key_file'
,
self
.
private_key_file
))
actual_private_key_file
=
os
.
path
.
expanduser
(
delegate_info
.
get
(
'ansible_ssh_private_key_file'
,
self
.
private_key_file
))
actual_transport
=
delegate_info
.
get
(
'ansible_connection'
,
self
.
transport
)
actual_transport
=
delegate_info
.
get
(
'ansible_connection'
,
self
.
transport
)
self
.
sudo_pass
=
delegate_info
.
get
(
'ansible_sudo_pass'
,
self
.
sudo_pass
)
self
.
sudo_pass
=
delegate_info
.
get
(
'ansible_sudo_pass'
,
self
.
sudo_pass
)
if
actual_private_key_file
is
not
None
:
actual_private_key_file
=
os
.
path
.
expanduser
(
actual_private_key_file
)
for
i
in
delegate_info
:
for
i
in
delegate_info
:
if
i
.
startswith
(
"ansible_"
)
and
i
.
endswith
(
"_interpreter"
):
if
i
.
startswith
(
"ansible_"
)
and
i
.
endswith
(
"_interpreter"
):
inject
[
i
]
=
delegate_info
[
i
]
inject
[
i
]
=
delegate_info
[
i
]
...
...
lib/ansible/runner/action_plugins/synchronize.py
View file @
30678e04
...
@@ -79,9 +79,11 @@ class ActionModule(object):
...
@@ -79,9 +79,11 @@ class ActionModule(object):
if
not
dest_host
is
src_host
:
if
not
dest_host
is
src_host
:
user
=
inject
.
get
(
'ansible_ssh_user'
,
user
=
inject
.
get
(
'ansible_ssh_user'
,
self
.
runner
.
remote_user
)
self
.
runner
.
remote_user
)
private_key
=
os
.
path
.
expanduser
(
inject
.
get
(
'ansible_ssh_private_key_file'
,
self
.
runner
.
private_key_file
)
)
private_key
=
inject
.
get
(
'ansible_ssh_private_key_file'
,
self
.
runner
.
private_key_file
)
if
not
private_key
is
None
:
if
not
private_key
is
None
:
private_key
=
os
.
path
.
expanduser
(
private_key
)
options
[
'private_key'
]
=
private_key
options
[
'private_key'
]
=
private_key
src
=
self
.
_process_origin
(
src_host
,
src
,
user
)
src
=
self
.
_process_origin
(
src_host
,
src
,
user
)
dest
=
self
.
_process_origin
(
dest_host
,
dest
,
user
)
dest
=
self
.
_process_origin
(
dest_host
,
dest
,
user
)
...
...
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