by XDK
24. September 2019 05:41
Explanation:
Following are the levels of variable precedence arranged from the least (always gets overridden) to the most (can override anything below it):
1. Role defaults
2. Inventory files (host_vars > group_vars > vars)
3. Playbook group_vars
4. Playbook host_vars
5. Host facts
6. Variables files > vars_prompt > vars
7. Variables created using the register clause
8. Variables files created inside Roles and those set by the include_vars module
9. Variables defined in a block
10. Variables defined in a task block
11. Any variables passed through -e during command execution
c022cc51-3cf0-437e-a508-52ae1da9550d|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
Ansible