@ -112,6 +112,7 @@ class CLI(with_metaclass(ABCMeta, object)):
# -F (quit-if-one-screen) -R (allow raw ansi control chars)
# -S (chop long lines) -X (disable termcap init and de-init)
LESS_OPTS = ' FRSX '
SKIP_INVENTORY_DEFAULTS = False
def __init__ ( self , args , callback = None ) :
"""
@ -424,8 +425,7 @@ class CLI(with_metaclass(ABCMeta, object)):
if inventory_opts :
parser . add_option ( ' -i ' , ' --inventory ' , ' --inventory-file ' , dest = ' inventory ' , action = " append " ,
help = " specify inventory host path (default=[ %s ]) or comma separated host list. "
" --inventory-file is deprecated " % C . DEFAULT_HOST_LIST )
help = " specify inventory host path or comma separated host list. --inventory-file is deprecated " )
parser . add_option ( ' --list-hosts ' , dest = ' listhosts ' , action = ' store_true ' ,
help = ' outputs a list of matching hosts; does not execute anything else ' )
parser . add_option ( ' -l ' , ' --limit ' , default = C . DEFAULT_SUBSET , dest = ' subset ' ,
@ -605,8 +605,8 @@ class CLI(with_metaclass(ABCMeta, object)):
skip_tags . add ( tag . strip ( ) )
self . options . skip_tags = list ( skip_tags )
# process inventory options
if hasattr ( self . options , ' inventory ' ) :
# process inventory options except for CLIs that require their own processing
if hasattr ( self . options , ' inventory ' ) and not self . SKIP_INVENTORY_DEFAULTS :
if self . options . inventory :
@ -616,7 +616,6 @@ class CLI(with_metaclass(ABCMeta, object)):
# Ensure full paths when needed
self . options . inventory = [ unfrackpath ( opt , follow = False ) if ' , ' not in opt else opt for opt in self . options . inventory ]
else :
self . options . inventory = C . DEFAULT_HOST_LIST