diff --git a/lib/ansible/cli/__init__.py b/lib/ansible/cli/__init__.py index 07bf7a69119..6d0292dba15 100644 --- a/lib/ansible/cli/__init__.py +++ b/lib/ansible/cli/__init__.py @@ -596,9 +596,7 @@ class CLI(with_metaclass(ABCMeta, object)): self.options.inventory = [unfrackpath(opt) if ',' not in opt else opt for opt in self.options.inventory] else: - # set default if it exists - if os.path.exists(C.DEFAULT_HOST_LIST): - self.options.inventory = [C.DEFAULT_HOST_LIST] + self.options.inventory = C.DEFAULT_HOST_LIST @staticmethod def version(prog): diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml index 4ba8c460df1..e18f1016331 100644 --- a/lib/ansible/config/base.yml +++ b/lib/ansible/config/base.yml @@ -604,7 +604,7 @@ DEFAULT_HOST_LIST: expand_relative_paths: True ini: - {key: inventory, section: defaults} - type: path + type: pathlist yaml: {key: defaults.inventory} DEFAULT_INTERNAL_POLL_INTERVAL: default: 0.001