a2599cab79
This commit also adds a new test script (ansible-var-precedence-check.py in code-smell/) to provide us with another line of defense against precedence bugs going forward. The precedence docs state that the INI vars have a lower precedence than group/host vars files for inventory and playbooks, however that has not been the case since 2.0 was released. This change fixes that in one way, though not exactly as the docs say. The rules are: 1) INI/script < inventory dir < playbook dir 2) "all" group vars < other group_vars < host_vars So the new order will be (from the test script mentioned above): 8. pb_host_vars_file - var in playbook/host_vars/host 9. ini_host_vars_file - var in inventory/host_vars/host 10. ini_host - host var inside the ini 11. pb_group_vars_file_child - var in playbook/group_vars/child 12. ini_group_vars_file_child - var in inventory/group_vars/child 13. pb_group_vars_file_parent - var in playbook/group_vars/parent 14. ini_group_vars_file_parent - var in inventory/group_vars/parent 15. pb_group_vars_file_all - var in playbook/group_vars/all 16. ini_group_vars_file_all - var in inventory/group_vars/all 17. ini_child - child group var inside the ini 18. ini_parent - parent group var inside the ini 19. ini_all - all group var inside the ini Fixes #21845 |
||
---|---|---|
.. | ||
dev_guide | ||
modules | ||
roadmap | ||
become.rst | ||
committer_guidelines.rst | ||
common_return_values.rst | ||
community.rst | ||
conf.py | ||
faq.rst | ||
galaxy.rst | ||
glossary.rst | ||
guide_aws.rst | ||
guide_azure.rst | ||
guide_cloudstack.rst | ||
guide_docker.rst | ||
guide_gce.rst | ||
guide_rax.rst | ||
guide_rolling_upgrade.rst | ||
guide_vagrant.rst | ||
guides.rst | ||
index.rst | ||
intro.rst | ||
intro_adhoc.rst | ||
intro_bsd.rst | ||
intro_configuration.rst | ||
intro_dynamic_inventory.rst | ||
intro_getting_started.rst | ||
intro_installation.rst | ||
intro_inventory.rst | ||
intro_networking.rst | ||
intro_patterns.rst | ||
intro_windows.rst | ||
modules.rst | ||
modules_intro.rst | ||
modules_support.rst | ||
playbooks.rst | ||
playbooks_acceleration.rst | ||
playbooks_advanced_syntax.rst | ||
playbooks_async.rst | ||
playbooks_best_practices.rst | ||
playbooks_blocks.rst | ||
playbooks_checkmode.rst | ||
playbooks_conditionals.rst | ||
playbooks_debugger.rst | ||
playbooks_delegation.rst | ||
playbooks_environment.rst | ||
playbooks_error_handling.rst | ||
playbooks_filters.rst | ||
playbooks_filters_ipaddr.rst | ||
playbooks_intro.rst | ||
playbooks_lookups.rst | ||
playbooks_loops.rst | ||
playbooks_prompts.rst | ||
playbooks_roles.rst | ||
playbooks_special_topics.rst | ||
playbooks_startnstep.rst | ||
playbooks_strategies.rst | ||
playbooks_tags.rst | ||
playbooks_templating.rst | ||
playbooks_tests.rst | ||
playbooks_variables.rst | ||
playbooks_vault.rst | ||
porting_guide_2.0.rst | ||
python_3_support.rst | ||
quickstart.rst | ||
test_strategies.rst | ||
tower.rst | ||
YAMLSyntax.rst |