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
31b45479
Commit
31b45479
authored
Oct 18, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When using delegation, local_action should always use the local connection type.
parent
d58bc4da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
docsite/rst/who_uses_ansible.rst
+2
-2
lib/ansible/runner/__init__.py
+7
-4
lib/ansible/runner/connection.py
+3
-2
No files found.
docsite/rst/who_uses_ansible.rst
View file @
31b45479
...
@@ -7,7 +7,7 @@ The following is an opt-in list of just some of the folks using Ansible -- to ge
...
@@ -7,7 +7,7 @@ The following is an opt-in list of just some of the folks using Ansible -- to ge
* `Alta Language Services <http://www.altalang.com>`_ - language testing, solutions, and translation services
* `Alta Language Services <http://www.altalang.com>`_ - language testing, solutions, and translation services
* `Basho <http://basho.com>`_ - makers of NoSQL engine Riak
* `Basho <http://basho.com>`_ - makers of NoSQL engine Riak
*
`CatN Hosting <http://catn.com>`_ - scalable Cloud hosting
* `CatN Hosting <http://catn.com>`_ - scalable Cloud hosting
* `Cygate AB <http://cygate.se>`_ - IT solutions from Malmo, Sweeden
* `Cygate AB <http://cygate.se>`_ - IT solutions from Malmo, Sweeden
* `Dag IT Solutions <http://dagit.net>`_ - Enterprise Linux & Beyond
* `Dag IT Solutions <http://dagit.net>`_ - Enterprise Linux & Beyond
* `Duke University Economics <http://duke.edu>`_ - Research & Education
* `Duke University Economics <http://duke.edu>`_ - Research & Education
...
@@ -18,7 +18,7 @@ The following is an opt-in list of just some of the folks using Ansible -- to ge
...
@@ -18,7 +18,7 @@ The following is an opt-in list of just some of the folks using Ansible -- to ge
* `Scientific Computing Center, Aristotle Univ. of Thessaloniki <http://www.grid.auth.gr/en/>`_ - Grid/Cloud-Based Scientific Computing
* `Scientific Computing Center, Aristotle Univ. of Thessaloniki <http://www.grid.auth.gr/en/>`_ - Grid/Cloud-Based Scientific Computing
* `Skylines.io <http://skylines.io>`_ - Real time photo search engine
* `Skylines.io <http://skylines.io>`_ - Real time photo search engine
* `Steelhouse <http://steelhouse.com>`_ - Behavioral commerce
* `Steelhouse <http://steelhouse.com>`_ - Behavioral commerce
* `Tom
m
orrow Focus Technologies GmbH <http://www.t-f-t.net/>`_ - Running some of the biggest web sites in Europe
* `Tomorrow Focus Technologies GmbH <http://www.t-f-t.net/>`_ - Running some of the biggest web sites in Europe
* `123i.com.br <http://123i.com.br>`_ - Find real estate in Brazil
* `123i.com.br <http://123i.com.br>`_ - Find real estate in Brazil
* `Ginsys <http://ginsys.eu/>`_ - Linux infrastructure consulting from Belgium
* `Ginsys <http://ginsys.eu/>`_ - Linux infrastructure consulting from Belgium
lib/ansible/runner/__init__.py
View file @
31b45479
...
@@ -49,7 +49,7 @@ dirname = os.path.dirname(__file__)
...
@@ -49,7 +49,7 @@ dirname = os.path.dirname(__file__)
action_plugin_list
=
utils
.
import_plugins
(
os
.
path
.
join
(
dirname
,
'action_plugins'
))
action_plugin_list
=
utils
.
import_plugins
(
os
.
path
.
join
(
dirname
,
'action_plugins'
))
for
i
in
reversed
(
C
.
DEFAULT_ACTION_PLUGIN_PATH
.
split
(
os
.
pathsep
)):
for
i
in
reversed
(
C
.
DEFAULT_ACTION_PLUGIN_PATH
.
split
(
os
.
pathsep
)):
action_plugin_list
.
update
(
utils
.
import_plugins
(
i
))
action_plugin_list
.
update
(
utils
.
import_plugins
(
i
))
lookup_plugin_list
=
utils
.
import_plugins
(
os
.
path
.
join
(
dirname
,
'lookup_plugins'
))
lookup_plugin_list
=
utils
.
import_plugins
(
os
.
path
.
join
(
dirname
,
'lookup_plugins'
))
for
i
in
reversed
(
C
.
DEFAULT_LOOKUP_PLUGIN_PATH
.
split
(
os
.
pathsep
)):
for
i
in
reversed
(
C
.
DEFAULT_LOOKUP_PLUGIN_PATH
.
split
(
os
.
pathsep
)):
lookup_plugin_list
.
update
(
utils
.
import_plugins
(
i
))
lookup_plugin_list
.
update
(
utils
.
import_plugins
(
i
))
...
@@ -285,7 +285,7 @@ class Runner(object):
...
@@ -285,7 +285,7 @@ class Runner(object):
if
self
.
transport
in
[
'paramiko'
,
'ssh'
]:
if
self
.
transport
in
[
'paramiko'
,
'ssh'
]:
port
=
host_variables
.
get
(
'ansible_ssh_port'
,
self
.
remote_port
)
port
=
host_variables
.
get
(
'ansible_ssh_port'
,
self
.
remote_port
)
if
port
is
None
:
if
port
is
None
:
port
=
C
.
DEFAULT_REMOTE_PORT
port
=
C
.
DEFAULT_REMOTE_PORT
else
:
else
:
# fireball, local, etc
# fireball, local, etc
port
=
self
.
remote_port
port
=
self
.
remote_port
...
@@ -399,11 +399,14 @@ class Runner(object):
...
@@ -399,11 +399,14 @@ class Runner(object):
actual_host
=
delegate_to
actual_host
=
delegate_to
try
:
try
:
# connect
transport
=
None
# use Runner setting
conn
=
self
.
connector
.
connect
(
actual_host
,
int
(
actual_port
))
if
delegate_to
and
actual_host
in
[
'127.0.0.1'
,
'localhost'
]:
transport
=
'local'
conn
=
self
.
connector
.
connect
(
actual_host
,
int
(
actual_port
),
transport
=
transport
)
if
delegate_to
:
if
delegate_to
:
conn
.
delegate
=
host
conn
.
delegate
=
host
except
errors
.
AnsibleConnectionFailed
,
e
:
except
errors
.
AnsibleConnectionFailed
,
e
:
result
=
dict
(
failed
=
True
,
msg
=
"FAILED:
%
s"
%
str
(
e
))
result
=
dict
(
failed
=
True
,
msg
=
"FAILED:
%
s"
%
str
(
e
))
return
ReturnData
(
host
=
host
,
comm_ok
=
False
,
result
=
result
)
return
ReturnData
(
host
=
host
,
comm_ok
=
False
,
result
=
result
)
...
...
lib/ansible/runner/connection.py
View file @
31b45479
...
@@ -40,12 +40,13 @@ class Connection(object):
...
@@ -40,12 +40,13 @@ class Connection(object):
self
.
runner
=
runner
self
.
runner
=
runner
self
.
modules
=
None
self
.
modules
=
None
def
connect
(
self
,
host
,
port
):
def
connect
(
self
,
host
,
port
,
transport
=
None
):
if
self
.
modules
is
None
:
if
self
.
modules
is
None
:
self
.
modules
=
modules
.
copy
()
self
.
modules
=
modules
.
copy
()
self
.
modules
.
update
(
utils
.
import_plugins
(
os
.
path
.
join
(
self
.
runner
.
basedir
,
'connection_plugins'
)))
self
.
modules
.
update
(
utils
.
import_plugins
(
os
.
path
.
join
(
self
.
runner
.
basedir
,
'connection_plugins'
)))
conn
=
None
conn
=
None
transport
=
self
.
runner
.
transport
if
transport
is
None
:
transport
=
self
.
runner
.
transport
module
=
self
.
modules
.
get
(
transport
,
None
)
module
=
self
.
modules
.
get
(
transport
,
None
)
if
module
is
None
:
if
module
is
None
:
raise
AnsibleError
(
"unsupported connection type:
%
s"
%
transport
)
raise
AnsibleError
(
"unsupported connection type:
%
s"
%
transport
)
...
...
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