mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
playbook variables precedence list light edits
QA had asked me a while ago to clean up the way the precedence list for 1.x was worded, as the intro from the list started with "then", as if something should preceed it. The comments from OxABAB were not helpful, but his issue reminded me that this was on my to do list to make a little cleaner and clearer. Edits made to remove the "then" intros for each list line, to help with clarity.
This commit is contained in:
parent
f9526b2ab2
commit
17f7e6162a
1 changed files with 7 additions and 8 deletions
|
@ -758,19 +758,18 @@ If multiple variables of the same name are defined in different places, they get
|
||||||
|
|
||||||
.. include:: ansible_ssh_changes_note.rst
|
.. include:: ansible_ssh_changes_note.rst
|
||||||
|
|
||||||
In 1.x the precedence is (last listed wins):
|
In 1.x, the precedence is as follows (and last listed wins prioritization):
|
||||||
|
|
||||||
* then "role defaults", which are the most "defaulty" and lose in priority to everything.
|
* "role defaults", which lose in priority to everything
|
||||||
* then come the variables defined in inventory
|
* variables defined in inventory
|
||||||
* then come the facts discovered about a system
|
* facts discovered about a system
|
||||||
* then comes "most everything else" (command line switches, vars in play, included vars, role vars, etc)
|
* "most everything else" (command line switches, vars in play, included vars, role vars, etc.)
|
||||||
* then come connection variables (``ansible_user``, etc)
|
* connection variables (``ansible_user``, etc.)
|
||||||
* extra vars (``-e`` in the command line) always win
|
* extra vars (``-e`` in the command line) always win
|
||||||
|
|
||||||
.. note:: In versions prior to 1.5.4, facts discovered about a system were in the "most everything else" category above.
|
.. note:: In versions prior to 1.5.4, facts discovered about a system were in the "most everything else" category above.
|
||||||
|
|
||||||
|
In 2.x we have made the order of precedence more specific (and last listed wins prioritization):
|
||||||
In 2.x we have made the order of precedence more specific (last listed wins):
|
|
||||||
|
|
||||||
* role defaults [1]_
|
* role defaults [1]_
|
||||||
* inventory vars [2]_
|
* inventory vars [2]_
|
||||||
|
|
Loading…
Reference in a new issue