diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 8454af29e39..f0afda8de5f 100644 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -61,8 +61,6 @@ class DocCLI(CLI): help='List available plugins') self.parser.add_option("-s", "--snippet", action="store_true", default=False, dest='show_snippet', help='Show playbook snippet for specified plugin(s)') - self.parser.add_option("-a", "--all", action="store_true", default=False, dest='all_plugins', - help='**For internal testing only** Show documentation for all plugins.') self.parser.add_option("-j", "--json", action="store_true", default=False, dest='json_dump', help='**For internal testing only** Dump json metadata for all plugins.') self.parser.add_option("-t", "--type", action="store", default='module', dest='type', type='choice', @@ -73,17 +71,11 @@ class DocCLI(CLI): def post_process_args(self, options, args): options, args = super(DocCLI, self).post_process_args(options, args) - if [options.all_plugins, options.json_dump, options.list_dir, options.list_files, options.show_snippet].count(True) > 1: - raise AnsibleOptionsError("Only one of -l, -F, -s, -j or -a can be used at the same time.") + if [options.json_dump, options.list_dir, options.list_files, options.show_snippet].count(True) > 1: + raise AnsibleOptionsError("Only one of -l, -F, -s, or -j can be used at the same time.") display.verbosity = options.verbosity - # process all plugins of type - if options.all_plugins: - args = self.get_all_plugins_of_type(options.type) - if options.module_path: - display.warning('Ignoring "--module-path/-M" option as "--all/-a" only displays builtins') - return options, args def run(self): diff --git a/test/units/cli/test_doc.py b/test/units/cli/test_doc.py deleted file mode 100644 index eb117dc56d9..00000000000 --- a/test/units/cli/test_doc.py +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright: (c) 2019, Ansible Project -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -from ansible.cli.doc import DocCLI - - -def test_parsing_all_option(): - doc_cli = DocCLI(['/n/ansible-doc', '-a']) - doc_cli.parse()