mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 01:44:03 -07:00
runner buglet and yum module
runner: fix buglet causing logger output to include a u for the command yum: add yum module: ensure=installed pkg=name/name.arch/name-ver-rel.arch ensure=removed pkg=name/name.arch/name-ver-rel.arch list=installed list=updates list=available list=pkgspec list=repos
This commit is contained in:
parent
c89a0f96bd
commit
b576e389b1
2 changed files with 236 additions and 1 deletions
|
@ -374,12 +374,13 @@ class Runner(object):
|
|||
|
||||
def remote_log(self, conn, msg):
|
||||
''' this is the function we use to log things '''
|
||||
stdin, stdout, stderr = conn.exec_command('/usr/bin/logger -t ansible -p auth.info %r' % msg)
|
||||
stdin, stdout, stderr = conn.exec_command('/usr/bin/logger -t ansible -p auth.info "%s"' % msg)
|
||||
# TODO: maybe make that optional
|
||||
|
||||
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)
|
||||
stdin, stdout, stderr = conn.exec_command(cmd)
|
||||
results = "\n".join(stdout.readlines())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue