From a68de9bfb6a624ab3732b642592e24807c7847e7 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 22:46:54 +0100 Subject: [PATCH] [PR #9456/17d36da1 backport][stable-10] yaml callback plugin: deprecation (#9469) yaml callback plugin: deprecation (#9456) * yaml callback pulign: deprecation * add changelog frag * Update plugins/callback/yaml.py Co-authored-by: Felix Fontein * set removal to 13.0.0 --------- Co-authored-by: Felix Fontein (cherry picked from commit 17d36da15049b3c8cef455db27f132d51b3ac212) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- changelogs/fragments/9456-yaml-callback-deprecation.yml | 2 ++ meta/runtime.yml | 4 ++++ plugins/callback/yaml.py | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 changelogs/fragments/9456-yaml-callback-deprecation.yml diff --git a/changelogs/fragments/9456-yaml-callback-deprecation.yml b/changelogs/fragments/9456-yaml-callback-deprecation.yml new file mode 100644 index 0000000000..47c0708c20 --- /dev/null +++ b/changelogs/fragments/9456-yaml-callback-deprecation.yml @@ -0,0 +1,2 @@ +deprecated_features: + - yaml callback plugin - deprecate plugin in favor of ``result_format=yaml`` in plugin ``ansible.bulitin.default`` (https://github.com/ansible-collections/community.general/pull/9456). diff --git a/meta/runtime.yml b/meta/runtime.yml index 427c376b0f..b52bc8b911 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -83,6 +83,10 @@ plugin_routing: removal_version: 2.0.0 warning_text: Use the 'default' callback plugin with 'display_failed_stderr = yes' option. + yaml: + deprecation: + removal_version: 13.0.0 + warning_text: The plugin has been superseded by the the option `result_format=yaml` in callback plugin ansible.builtin.default from ansible-core 2.13 onwards. connection: docker: redirect: community.docker.docker diff --git a/plugins/callback/yaml.py b/plugins/callback/yaml.py index 6bee5086c3..0484f80a34 100644 --- a/plugins/callback/yaml.py +++ b/plugins/callback/yaml.py @@ -12,6 +12,10 @@ author: Unknown (!UNKNOWN) name: yaml type: stdout short_description: YAML-ized Ansible screen output +deprecated: + removed_in: 13.0.0 + why: Starting in ansible-core 2.13, the P(ansible.builtin.default#callback) callback has support for printing output in YAML format. + alternative: Use O(ansible.builtin.default#callback:result_format=yaml). description: - Ansible output that can be quite a bit easier to read than the default JSON formatting. extends_documentation_fragment: