summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2017-10-30 12:56:07 -0400
committerToshio Kuratomi <a.badger@gmail.com>2017-11-01 11:42:48 -0700
commitb2cef41bcd5ae20601384dea7960d74a64f48190 (patch)
tree4932562995b84face0df071915f4acbe0e29a1dc
parent5bbf70afe165d70307ce4235ab1465bebb8dd5b6 (diff)
downloadansible-b2cef41bcd5ae20601384dea7960d74a64f48190.tar.gz
added doc notes about vars plugins in precedence
(cherry picked from commit 52c97a1cf498bfaba4e6213287efaec64efab9e6)
-rw-r--r--docs/docsite/rst/playbooks_variables.rst14
1 files changed, 10 insertions, 4 deletions
diff --git a/docs/docsite/rst/playbooks_variables.rst b/docs/docsite/rst/playbooks_variables.rst
index 227235fb2e..b9499d30d8 100644
--- a/docs/docsite/rst/playbooks_variables.rst
+++ b/docs/docsite/rst/playbooks_variables.rst
@@ -836,13 +836,16 @@ In 2.x, we have made the order of precedence more specific (with the last listed
* role defaults [1]_
* inventory file or script group vars [2]_
- * inventory group_vars/all
- * playbook group_vars/all
- * inventory group_vars/*
- * playbook group_vars/*
+ * inventory group_vars/all [3]_
+ * playbook group_vars/all [3]_
+ * inventory group_vars/* [3]_
+ * playbook group_vars/* [3]_
* inventory file or script host vars [2]_
* inventory host_vars/*
* playbook host_vars/*
+ * host facts / cached set_facts [4]_
+ * inventory host_vars/* [3]_
+ * playbook host_vars/* [3]_
* host facts
* play vars
* play vars_prompt
@@ -862,6 +865,9 @@ Basically, anything that goes into "role defaults" (the defaults folder inside t
.. [1] Tasks in each role will see their own role's defaults. Tasks defined outside of a role will see the last role's defaults.
.. [2] Variables defined in inventory file or provided by dynamic inventory.
+.. [3] Includes vars added by 'vars plugins' as well as host_vars and group_vars which are added by the default vars plugin shipped with Ansible.
+.. [4] When created with set_facts's cacheable option, variables will have the high precedence in the play,
+ but will be the same as a host facts precedence when they come from the cache.
.. note:: Within any section, redefining a var will overwrite the previous instance.
If multiple groups have the same variable, the last one loaded wins.