`web01` is in both `prod` and `eu` groups, and `ntp_server` has a different value on every run you check
AdvancedTroubleshootingVariables, Facts and Precedence Problems
Answer
Likely causes → Both groups define ntp_server. For groups at the same level, Ansible merges in alphabetical order, so the last one wins (prod beats eu). A child group beats its parent. A teammate adding a group named zz_* changes the result without anyone noticing.
Diagnose →
ansible-inventory --host web01 --vars | jq .ntp_server
ansible-inventory --graph web01
Fix → Give one owner to each variable. To make the order explicit, use ansible_group_priority (higher wins; set it in inventory, not in group_vars):
eu:
vars:
ansible_group_priority: 10
Prevent → Design groups along separate dimensions (environment, region, role), and never define the same variable in two dimensions.
More on Variables, Facts and Precedence Problems
Variables in `group_vars/webservers.yml` are silently ignoredBeginnerYou set `nginx_port: 8443` in inventory `group_vars`, but the role still uses `80`Intermediate`set_fact: release_tag=v2` runs, but later tasks still see `v1`Intermediate`'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'` when templating `hostvars['db01']`Intermediate`'ansible_eth0' is undefined` on new cloud instancesBeginnerFacts like `ansible_hostname` became undefined after someone changed `ansible.cfg`Intermediate