1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixed executable, correctly this time

This commit is contained in:
Brian Coca 2015-06-15 11:26:45 -04:00
parent f576d29b6b
commit 8ae58f7ea3

View file

@ -25,6 +25,8 @@ import subprocess
#import select
#import fcntl
import ansible.constants as C
from ansible.errors import AnsibleError, AnsibleFileNotFound
from ansible.plugins.connections import ConnectionBase
@ -46,7 +48,7 @@ class Connection(ConnectionBase):
self._connected = True
return self
def exec_command(self, cmd, tmp_path, in_data=None):
def exec_command(self, cmd, tmp_path, in_data=None, sudoable=True):
''' run a command on the local host '''
super(Connection, self).exec_command(cmd, tmp_path, in_data=in_data)
@ -59,7 +61,7 @@ class Connection(ConnectionBase):
if in_data:
raise AnsibleError("Internal Error: this module does not support optimized module pipelining")
executable = self._connection_info.executable.split()[0] if self._connection_info.executable else None
executable = C.DEFAULT_EXECUTABLE.split()[0] if C.DEFAULT_EXECUTABLE else None
self._display.vvv("{0} EXEC {1}".format(self._connection_info.remote_addr, cmd))
# FIXME: cwd= needs to be set to the basedir of the playbook