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
057712c1
Commit
057712c1
authored
Aug 28, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also move action/connection plugins to shared plugin loader code
Fixes #12099
parent
0859ba77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
lib/ansible/executor/task_executor.py
+4
-5
lib/ansible/plugins/strategies/__init__.py
+4
-2
No files found.
lib/ansible/executor/task_executor.py
View file @
057712c1
...
@@ -29,7 +29,6 @@ from ansible import constants as C
...
@@ -29,7 +29,6 @@ from ansible import constants as C
from
ansible.errors
import
AnsibleError
,
AnsibleParserError
,
AnsibleUndefinedVariable
from
ansible.errors
import
AnsibleError
,
AnsibleParserError
,
AnsibleUndefinedVariable
from
ansible.playbook.conditional
import
Conditional
from
ansible.playbook.conditional
import
Conditional
from
ansible.playbook.task
import
Task
from
ansible.playbook.task
import
Task
from
ansible.plugins
import
connection_loader
,
action_loader
from
ansible.template
import
Templar
from
ansible.template
import
Templar
from
ansible.utils.listify
import
listify_lookup_plugin_terms
from
ansible.utils.listify
import
listify_lookup_plugin_terms
from
ansible.utils.unicode
import
to_unicode
from
ansible.utils.unicode
import
to_unicode
...
@@ -400,7 +399,7 @@ class TaskExecutor:
...
@@ -400,7 +399,7 @@ class TaskExecutor:
# Because this is an async task, the action handler is async. However,
# Because this is an async task, the action handler is async. However,
# we need the 'normal' action handler for the status check, so get it
# we need the 'normal' action handler for the status check, so get it
# now via the action_loader
# now via the action_loader
normal_handler
=
action_loader
.
get
(
normal_handler
=
self
.
_shared_loader_obj
.
action_loader
.
get
(
'normal'
,
'normal'
,
task
=
async_task
,
task
=
async_task
,
connection
=
self
.
_connection
,
connection
=
self
.
_connection
,
...
@@ -457,7 +456,7 @@ class TaskExecutor:
...
@@ -457,7 +456,7 @@ class TaskExecutor:
except
OSError
:
except
OSError
:
conn_type
=
"paramiko"
conn_type
=
"paramiko"
connection
=
connection_loader
.
get
(
conn_type
,
self
.
_play_context
,
self
.
_new_stdin
)
connection
=
self
.
_shared_loader_obj
.
connection_loader
.
get
(
conn_type
,
self
.
_play_context
,
self
.
_new_stdin
)
if
not
connection
:
if
not
connection
:
raise
AnsibleError
(
"the connection plugin '
%
s' was not found"
%
conn_type
)
raise
AnsibleError
(
"the connection plugin '
%
s' was not found"
%
conn_type
)
...
@@ -468,7 +467,7 @@ class TaskExecutor:
...
@@ -468,7 +467,7 @@ class TaskExecutor:
Returns the correct action plugin to handle the requestion task action
Returns the correct action plugin to handle the requestion task action
'''
'''
if
self
.
_task
.
action
in
action_loader
:
if
self
.
_task
.
action
in
self
.
_shared_loader_obj
.
action_loader
:
if
self
.
_task
.
async
!=
0
:
if
self
.
_task
.
async
!=
0
:
raise
AnsibleError
(
"async mode is not supported with the
%
s module"
%
module_name
)
raise
AnsibleError
(
"async mode is not supported with the
%
s module"
%
module_name
)
handler_name
=
self
.
_task
.
action
handler_name
=
self
.
_task
.
action
...
@@ -477,7 +476,7 @@ class TaskExecutor:
...
@@ -477,7 +476,7 @@ class TaskExecutor:
else
:
else
:
handler_name
=
'async'
handler_name
=
'async'
handler
=
action_loader
.
get
(
handler
=
self
.
_shared_loader_obj
.
action_loader
.
get
(
handler_name
,
handler_name
,
task
=
self
.
_task
,
task
=
self
.
_task
,
connection
=
connection
,
connection
=
connection
,
...
...
lib/ansible/plugins/strategies/__init__.py
View file @
057712c1
...
@@ -31,7 +31,7 @@ from ansible.playbook.handler import Handler
...
@@ -31,7 +31,7 @@ from ansible.playbook.handler import Handler
from
ansible.playbook.helpers
import
load_list_of_blocks
from
ansible.playbook.helpers
import
load_list_of_blocks
from
ansible.playbook.included_file
import
IncludedFile
from
ansible.playbook.included_file
import
IncludedFile
from
ansible.playbook.role
import
hash_params
from
ansible.playbook.role
import
hash_params
from
ansible.plugins
import
_basedirs
,
filter_loader
,
lookup_loader
,
module_loader
from
ansible.plugins
import
_basedirs
,
action_loader
,
connection_loader
,
filter_loader
,
lookup_loader
,
module_loader
from
ansible.template
import
Templar
from
ansible.template
import
Templar
try
:
try
:
...
@@ -51,7 +51,9 @@ class SharedPluginLoaderObj:
...
@@ -51,7 +51,9 @@ class SharedPluginLoaderObj:
the forked processes over the queue easier
the forked processes over the queue easier
'''
'''
def
__init__
(
self
):
def
__init__
(
self
):
self
.
basedirs
=
_basedirs
[:]
self
.
basedirs
=
_basedirs
[:]
self
.
action_loader
=
action_loader
self
.
connection_loader
=
connection_loader
self
.
filter_loader
=
filter_loader
self
.
filter_loader
=
filter_loader
self
.
lookup_loader
=
lookup_loader
self
.
lookup_loader
=
lookup_loader
self
.
module_loader
=
module_loader
self
.
module_loader
=
module_loader
...
...
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