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
8fb88be4
Commit
8fb88be4
authored
Oct 08, 2014
by
Chris Church
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simpler fix for module suffixes than
c02e8d8c
.
parent
c83a8337
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 @
8fb88be4
...
...
@@ -1224,7 +1224,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 @
8fb88be4
...
...
@@ -155,17 +155,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'
,
''
]
for
suffix
in
suffixes
:
full_name
=
'
%
s
%
s'
%
(
name
,
suffix
)
...
...
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