playbook: Move variables to the playbook instead use roles vars
The roles vars have priority the playbook ones (at least on 2.x): http://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#id18
Showing
-
Developer
I saw now, that I shall used another directory with default variables, see http://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable
role defaults [1]
It is better explained in http://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#directory-layout:
defaults/ # main.yml # <-- default lower priority variables for this role
It shall be in
defaults/
not invars/
, so this would become "default if not defined".I will experiment more about this in the future.
Please register or sign in to comment