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 select
#import fcntl #import fcntl
import ansible.constants as C
from ansible.errors import AnsibleError, AnsibleFileNotFound from ansible.errors import AnsibleError, AnsibleFileNotFound
from ansible.plugins.connections import ConnectionBase from ansible.plugins.connections import ConnectionBase
@ -46,7 +48,7 @@ class Connection(ConnectionBase):
self._connected = True self._connected = True
return self 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 ''' ''' run a command on the local host '''
super(Connection, self).exec_command(cmd, tmp_path, in_data=in_data) super(Connection, self).exec_command(cmd, tmp_path, in_data=in_data)
@ -59,7 +61,7 @@ class Connection(ConnectionBase):
if in_data: if in_data:
raise AnsibleError("Internal Error: this module does not support optimized module pipelining") 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)) 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 # FIXME: cwd= needs to be set to the basedir of the playbook