mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 16:53:11 +00:00
Remove remote log function as it's only used in one place now
This commit is contained in:
@@ -451,19 +451,13 @@ class Runner(object):
|
||||
|
||||
# *****************************************************
|
||||
|
||||
def remote_log(self, conn, msg):
|
||||
''' this is the function we use to log things '''
|
||||
|
||||
# FIXME: TODO: make this optional as it's executed a lot
|
||||
stdin, stdout, stderr = conn.exec_command('/usr/bin/logger -t ansible -p auth.info "%s"' % msg)
|
||||
|
||||
# *****************************************************
|
||||
|
||||
def _exec_command(self, conn, cmd):
|
||||
''' execute a command string over SSH, return the output '''
|
||||
|
||||
msg = '%s: %s' % (self.module_name, cmd)
|
||||
self.remote_log(conn, msg)
|
||||
# log remote command execution
|
||||
conn.exec_command('/usr/bin/logger -t ansible -p auth.info "%s"' % msg)
|
||||
# now run actual command
|
||||
stdin, stdout, stderr = conn.exec_command(cmd)
|
||||
return "\n".join(stdout.readlines())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user