host_vars with .yml

Hi,

I’m wondering why Ansible picks my variable file when it’s called host_vars/local, but not host_vars/local.yml.

Can I set a configuration flag to change this behavior?

Thanks,
Warren.

no, this is the matching order precedence "", ".yml", ".yaml",
".json", so local will be picked up if it exists in preference over
local.yml

I understand the order of precedence, but local.yml doesn’t get picked up even if there is no local.

Ok, I’m wrong. The host_vars directory was at the wrong place. It does pick the .yml file. Sorry for not checking properly.