Update variable precedence section with current rules

pull/1886/merge
Daniel Hokka Zakrisson 12 years ago
parent 48f48e8a44
commit 94a1c221bc

@ -777,11 +777,11 @@ to determine which place sets the value of the variable.
1. Variables loaded from YAML files mentioned in 'vars_files' in a playbook. 1. Variables loaded from YAML files mentioned in 'vars_files' in a playbook.
2. 'vars' as defined in the playbook. 2. facts, whether built in or custom, or variables assigned from the 'register' keyword.
3. facts, whether built in or custom, or variables assigned from the 'register' keyword. 3. variables passed to parameterized task include statements.
4. variables passed to parameterized task include statements. 4. 'vars' as defined in the playbook.
5. Host variables from inventory. 5. Host variables from inventory.

@ -261,8 +261,9 @@ class Play(object):
self.vars_files = [ self.vars_files ] self.vars_files = [ self.vars_files ]
if host is not None: if host is not None:
inject = self.playbook.SETUP_CACHE[host].copy() inject = {}
inject.update(self.playbook.inventory.get_variables(host)) inject.update(self.playbook.inventory.get_variables(host))
inject.update(self.playbook.SETUP_CACHE[host])
for filename in self.vars_files: for filename in self.vars_files:

Loading…
Cancel
Save