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
346689f9
Commit
346689f9
authored
Feb 26, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9293 from cchurch/module_suffixes
Simpler fix for module suffixes than
c02e8d8c
.
parents
5a64b2e2
8fb88be4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
lib/ansible/runner/__init__.py
+1
-1
lib/ansible/utils/plugins.py
+2
-5
No files found.
lib/ansible/runner/__init__.py
View file @
346689f9
...
...
@@ -1347,7 +1347,7 @@ class Runner(object):
# Search module path(s) for named module.
module_suffixes
=
getattr
(
conn
,
'default_suffixes'
,
None
)
module_path
=
utils
.
plugins
.
module_finder
.
find_plugin
(
module_name
,
module_suffixes
,
transport
=
self
.
transport
)
module_path
=
utils
.
plugins
.
module_finder
.
find_plugin
(
module_name
,
module_suffixes
)
if
module_path
is
None
:
module_path2
=
utils
.
plugins
.
module_finder
.
find_plugin
(
'ping'
,
module_suffixes
)
if
module_path2
is
not
None
:
...
...
lib/ansible/utils/plugins.py
View file @
346689f9
...
...
@@ -156,17 +156,14 @@ class PluginLoader(object):
self
.
_extra_dirs
.
append
(
directory
)
self
.
_paths
=
None
def
find_plugin
(
self
,
name
,
suffixes
=
None
,
transport
=
''
):
def
find_plugin
(
self
,
name
,
suffixes
=
None
):
''' Find a plugin named name '''
if
not
suffixes
:
if
self
.
class_name
:
suffixes
=
[
'.py'
]
else
:
if
transport
==
'winrm'
:
suffixes
=
[
'.ps1'
,
''
]
else
:
suffixes
=
[
'.py'
,
''
]
suffixes
=
[
'.py'
,
''
]
potential_names
=
frozenset
(
'
%
s
%
s'
%
(
name
,
s
)
for
s
in
suffixes
)
for
full_name
in
potential_names
:
...
...
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