Skip to content

Commit 4aeca60

Browse files
committed
corrected default inventory plugin order
default inventory plugin order now follows the hardcoded one in previous versions yaml plugin shoudl run before ini to avoid ini being able to parse some yaml files succesfully. fixes ansible#25321
1 parent 5d0340a commit 4aeca60

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/ansible.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
# enable callback plugins, they can output to stdout but cannot be 'stdout' type.
7373
#callback_whitelist = timer, mail
7474

75-
# enable inventory plugins, default: 'host_list', 'script', 'ini', 'yaml'
75+
# enable inventory plugins, default: 'host_list', 'script', 'yaml', 'ini'
7676
#inventory_enabled = host_list, aws, openstack, docker
7777

7878
# Determine whether includes in tasks and handlers are "static" by

lib/ansible/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def load_config_file():
242242
# Inventory
243243
DEFAULT_HOST_LIST = get_config(p, DEFAULTS, 'inventory', 'ANSIBLE_INVENTORY', '/etc/ansible/hosts', value_type='path', expand_relative_paths=True)
244244
INVENTORY_ENABLED = get_config(p, DEFAULTS, 'inventory_enabled', 'ANSIBLE_INVENTORY_ENABLED',
245-
['host_list', 'script', 'ini', 'yaml'], value_type='list')
245+
['host_list', 'script', 'yaml', 'ini'], value_type='list')
246246
INVENTORY_IGNORE_EXTS = get_config(p, DEFAULTS, 'inventory_ignore_extensions', 'ANSIBLE_INVENTORY_IGNORE',
247247
BLACKLIST_EXTS + (".orig", ".ini", ".cfg", ".retry"), value_type='list')
248248
INVENTORY_IGNORE_PATTERNS = get_config(p, DEFAULTS, 'inventory_ignore_patterns', 'ANSIBLE_INVENTORY_IGNORE_REGEX', [], value_type='list')

0 commit comments

Comments
 (0)