diff --git a/lib/ansible/cli/inventory.py b/lib/ansible/cli/inventory.py index cb0e8256d22..d5fefadbf42 100644 --- a/lib/ansible/cli/inventory.py +++ b/lib/ansible/cli/inventory.py @@ -78,6 +78,10 @@ class InventoryCLI(CLI): basedir_opts=True, ) + # remove unused default options + self.parser.remove_option('--limit') + self.parser.remove_option('--list-hosts') + # Actions action_group = optparse.OptionGroup(self.parser, "Actions", "One of following must be used on invocation, ONLY ONE!") action_group.add_option("--list", action="store_true", default=False, dest='list', help='Output all hosts info, works as inventory script') @@ -86,8 +90,6 @@ class InventoryCLI(CLI): help='create inventory graph, if supplying pattern it must be a valid group name') self.parser.add_option_group(action_group) - # Options - # graph self.parser.add_option("-y", "--yaml", action="store_true", default=False, dest='yaml', help='Use YAML format instead of default JSON, ignored for --graph')