Today I learned the order Ansible follows to get variable values.

  • Command line option -e
  • vars_files:
  • vars:
  • host_vars/
  • group_vars/
  • Role specific vars (role/default/main.yml)

Source