mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
make executable setting connection dependant
winrm shoudl not use executable, rest should? fixes #14233
This commit is contained in:
@@ -505,7 +505,7 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||||||
replacement strategy (python3 could use surrogateescape)
|
replacement strategy (python3 could use surrogateescape)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if executable is not None:
|
if executable is not None and self._connection.allow_executable:
|
||||||
cmd = executable + ' -c ' + pipes.quote(cmd)
|
cmd = executable + ' -c ' + pipes.quote(cmd)
|
||||||
|
|
||||||
display.debug("_low_level_execute_command(): starting")
|
display.debug("_low_level_execute_command(): starting")
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
|
|||||||
# as discovered by the specified file extension. An empty string as the
|
# as discovered by the specified file extension. An empty string as the
|
||||||
# language means any language.
|
# language means any language.
|
||||||
module_implementation_preferences = ('',)
|
module_implementation_preferences = ('',)
|
||||||
|
allow_executable = True
|
||||||
|
|
||||||
def __init__(self, play_context, new_stdin, *args, **kwargs):
|
def __init__(self, play_context, new_stdin, *args, **kwargs):
|
||||||
# All these hasattrs allow subclasses to override these parameters
|
# All these hasattrs allow subclasses to override these parameters
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ class Connection(ConnectionBase):
|
|||||||
|
|
||||||
module_implementation_preferences = ('.ps1', '')
|
module_implementation_preferences = ('.ps1', '')
|
||||||
become_methods = []
|
become_methods = []
|
||||||
|
allow_executable = False
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user