diff --git a/lib/ansible/cli/adhoc.py b/lib/ansible/cli/adhoc.py index d5d9ed1b4dd..807afbe0f03 100644 --- a/lib/ansible/cli/adhoc.py +++ b/lib/ansible/cli/adhoc.py @@ -174,6 +174,9 @@ class AdHocCLI(CLI): cb = self.callback elif self.options.one_line: cb = 'oneline' + # Respect custom 'stdout_callback' only with enabled 'bin_ansible_callbacks' + elif C.DEFAULT_LOAD_CALLBACK_PLUGINS and C.DEFAULT_STDOUT_CALLBACK != 'default': + cb = C.DEFAULT_STDOUT_CALLBACK else: cb = 'minimal'