From ca0b1efa5beba85716c8a2ed9538283ad619649a Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Mon, 3 May 2021 07:59:30 +0200 Subject: [PATCH] puppet - replace stdout with console in logdest option (#2407) (#2420) * Change stdout to console * readd stdout, resulting in console * add changelog * readd stdout to docs and add a warning when it is used * version of what??? Co-authored-by: Felix Fontein * postpone deprecation in another PR * remove console option, so it can be backported * change changelog respectively * Fix changelog formatting Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein (cherry picked from commit 26aba8e76687fb36688540194bec08a82c8b3070) Co-authored-by: Amin Vakil --- .../fragments/2407-puppet-change_stdout_to_console.yaml | 3 +++ plugins/modules/system/puppet.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/2407-puppet-change_stdout_to_console.yaml diff --git a/changelogs/fragments/2407-puppet-change_stdout_to_console.yaml b/changelogs/fragments/2407-puppet-change_stdout_to_console.yaml new file mode 100644 index 0000000000..697b8e78d7 --- /dev/null +++ b/changelogs/fragments/2407-puppet-change_stdout_to_console.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - puppet - replace ``console` with ``stdout`` in ``logdest`` option when ``all`` has been chosen (https://github.com/ansible-collections/community.general/issues/1190). diff --git a/plugins/modules/system/puppet.py b/plugins/modules/system/puppet.py index 309da290d0..b83ef89aa5 100644 --- a/plugins/modules/system/puppet.py +++ b/plugins/modules/system/puppet.py @@ -54,7 +54,8 @@ options: logdest: description: - Where the puppet logs should go, if puppet apply is being used. - - C(all) will go to both C(stdout) and C(syslog). + - C(all) will go to both C(console) and C(syslog). + - C(stdout) will be deprecated and replaced by C(console). type: str choices: [ all, stdout, syslog ] default: stdout @@ -127,7 +128,7 @@ EXAMPLES = r''' community.general.puppet: noop: yes -- name: Run a manifest with debug, log to both syslog and stdout, specify module path +- name: Run a manifest with debug, log to both syslog and console, specify module path community.general.puppet: modulepath: /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules logdest: all @@ -269,7 +270,7 @@ def main(): if p['logdest'] == 'syslog': cmd += "--logdest syslog " if p['logdest'] == 'all': - cmd += " --logdest syslog --logdest stdout" + cmd += " --logdest syslog --logdest console" if p['modulepath']: cmd += "--modulepath='%s'" % p['modulepath'] if p['environment']: