diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index cc69f2981f..4b4aa3507a 100644 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -156,7 +156,10 @@ class DocCLI(CLI): # process command line list text = '' for plugin in self.args: - text += self.format_plugin_doc(plugin, loader, plugin_type, search_paths) + textret = self.format_plugin_doc(plugin, loader, plugin_type, search_paths) + + if textret: + text += textret if text: self.pager(text)