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
2cbf2838
Commit
2cbf2838
authored
Sep 05, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move check for accelerate mode deeper to account for ansible_connection
Fixes #4045
parent
20b0dc4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
lib/ansible/runner/__init__.py
+10
-8
No files found.
lib/ansible/runner/__init__.py
View file @
2cbf2838
...
...
@@ -186,13 +186,7 @@ class Runner(object):
self
.
accelerate_port
=
accelerate_port
self
.
callbacks
.
runner
=
self
if
self
.
accelerate
and
self
.
transport
!=
'local'
:
# if we're using accelerated mode, force the
# transport to accelerate
self
.
transport
=
"accelerate"
if
not
self
.
accelerate_port
:
self
.
accelerate_port
=
C
.
ACCELERATE_PORT
elif
self
.
transport
==
'smart'
:
if
self
.
transport
==
'smart'
:
# if the transport is 'smart' see if SSH can support ControlPersist if not use paramiko
# 'smart' is the default since 1.2.1/1.3
cmd
=
subprocess
.
Popen
([
'ssh'
,
'-o'
,
'ControlPersist'
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
...
...
@@ -579,6 +573,14 @@ class Runner(object):
actual_pass
=
inject
.
get
(
'ansible_ssh_pass'
,
self
.
remote_pass
)
actual_transport
=
inject
.
get
(
'ansible_connection'
,
self
.
transport
)
actual_private_key_file
=
inject
.
get
(
'ansible_ssh_private_key_file'
,
self
.
private_key_file
)
if
self
.
accelerate
and
actual_transport
!=
'local'
:
# if we're using accelerated mode, force the
# transport to accelerate
actual_transport
=
"accelerate"
if
not
self
.
accelerate_port
:
self
.
accelerate_port
=
C
.
ACCELERATE_PORT
if
actual_transport
in
[
'paramiko'
,
'ssh'
,
'accelerate'
]:
actual_port
=
inject
.
get
(
'ansible_ssh_port'
,
port
)
...
...
@@ -620,7 +622,7 @@ class Runner(object):
inject
[
'ansible_ssh_user'
]
=
actual_user
try
:
if
self
.
transport
==
'accelerate'
:
if
actual_
transport
==
'accelerate'
:
# for accelerate, we stuff both ports into a single
# variable so that we don't have to mangle other function
# calls just to accomodate this one case
...
...
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