In the RHLS training for RH294v9k the last lab for role creation has a variable mentioned in the playbook which has to be moved to appropriate roles yml file.
I have moved the variable values in defaults/main.yml where as the check script is expecting it in vars/main.yml file for the role..
I am trying to understand why vars/main.yml is considered the correct answer when the same result can be achieved by putting in defaults/main.yml as well. Would it not be just a case of variable precedence?
Looking forward to explanations for the right answer considered as vars/main.yml and why not defaults/main.yml ?
Thanks in Advance