Junior — Middle
Where in the Ansible file structure are the variables with the least importance and priority?
sobes.tech AI
Answer from AI
In Ansible, variables with the lowest priority are usually located in defaults/main.yml files within roles. These variables are called "default variables" and have the lowest priority, meaning they can be overridden by variables from other sources such as vars, inventory, or variables passed through the command line.
Example of a role structure:
roles/
myrole/
defaults/
main.yml # variables with the lowest priority
vars/
main.yml # variables with a higher priority
Thus, if you need to set default values that can be easily overridden, they are placed in defaults/main.yml.