Documentation 
<https://docs.ansible.com/ansible/2.8/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable>
 
(see 4-7, 9, 10 from the list of priorities)  says that playbook level 
variables override an inventory ones. Can somebody explain why this is the 
case? To me this is counter-intuitive and keeps leading to mistakes.

Intuitive way would be:

1) role defaults (specified within the role itself)
                  ⇩
2) infrastructure defaults, e.g. datacenter level (specified in group_vars 
or host_vars on the playbook level)
                  ⇩
3) inventory defaults, e.g. availability zone, or a specific project, etc 
(specified in group_vars or host_vars on inventory level)

However the fact is that 2 always overrides 3. How was it supposed to be 
used?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/931512b0-f477-4118-938d-b797d0422107%40googlegroups.com.

Reply via email to