Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed missing default #69972

Merged
merged 3 commits into from Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/deprecate_default_call_fragmentless.yml
@@ -0,0 +1,4 @@
deprecated_features:
- Using the DefaultCallback without the correspodning doc_fragment or copying the documentation.
bugfixes:
- added new option for default callback to compat variable to avoid old 3rd party plugins from erroring out.
6 changes: 4 additions & 2 deletions lib/ansible/plugins/callback/default.py
Expand Up @@ -43,7 +43,6 @@
from ansible.plugins.callback import CallbackBase
from ansible.utils.color import colorize, hostcolor


# These values use ansible.constants for historical reasons, mostly to allow
# unmodified derivative plugins to work. However, newer options added to the
# plugin are not also added to ansible.constants, so authors of derivative
Expand All @@ -57,7 +56,8 @@
('display_ok_hosts', True),
('show_custom_stats', C.SHOW_CUSTOM_STATS),
('display_failed_stderr', False),
('check_mode_markers', False),)
('check_mode_markers', False),
('show_per_host_start', False))


class CallbackModule(CallbackBase):
Expand Down Expand Up @@ -88,6 +88,8 @@ def set_options(self, task_keys=None, var_options=None, direct=None):
try:
value = self.get_option(option)
except (AttributeError, KeyError):
self._display.deprecated("'%s' is subclassing DefaultCallback without the corresponding doc_fragment." % self._load_name,
version='2.14')
value = constant
setattr(self, option, value)

Expand Down