mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* logentries - invoke run_command passing list
* added changelog fragment
(cherry picked from commit cb0ade4323
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
b85ff2a997
commit
9ddb75a3a2
2 changed files with 4 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- logentries - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3807).
|
|
@ -63,7 +63,7 @@ def query_log_status(module, le_path, path, state="present"):
|
|||
""" Returns whether a log is followed or not. """
|
||||
|
||||
if state == "present":
|
||||
rc, out, err = module.run_command("%s followed %s" % (le_path, path))
|
||||
rc, out, err = module.run_command([le_path, "followed", path])
|
||||
if rc == 0:
|
||||
return True
|
||||
|
||||
|
@ -87,7 +87,7 @@ def follow_log(module, le_path, logs, name=None, logtype=None):
|
|||
cmd.extend(['--name', name])
|
||||
if logtype:
|
||||
cmd.extend(['--type', logtype])
|
||||
rc, out, err = module.run_command(' '.join(cmd))
|
||||
rc, out, err = module.run_command(cmd)
|
||||
|
||||
if not query_log_status(module, le_path, log):
|
||||
module.fail_json(msg="failed to follow '%s': %s" % (log, err.strip()))
|
||||
|
|
Loading…
Reference in a new issue