Don't search powershell modules unless using the winrm connection.

This commit is contained in:
Michael DeHaan 2014-09-28 12:17:03 -04:00
commit c02e8d8c80
3 changed files with 7 additions and 4 deletions

View file

@ -1213,7 +1213,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)
module_path = utils.plugins.module_finder.find_plugin(module_name, module_suffixes, transport=self.transport)
if module_path is None:
module_path2 = utils.plugins.module_finder.find_plugin('ping', module_suffixes)
if module_path2 is not None: