Quite often, Ansible playbook developers finding it diffcult on, where to place the 'vars'. Because Ansible supports variable declaration at various levels.
Here is the order of precedence from least to greatest (the last listed variables winning prioritization):
- command line values (eg “-u user”)
- role defaults
- inventory file or script group vars
- inventory group_vars/all
- playbook group_vars/all