Use extra vars when creating HostVars

Fixes #9667
pull/9376/merge
James Cammarata 10 years ago
parent e6501f6718
commit e61e8a37f5

@ -668,7 +668,7 @@ class Runner(object):
''' executes any module one or more times ''' ''' executes any module one or more times '''
inject = self.get_inject_vars(host) inject = self.get_inject_vars(host)
hostvars = HostVars(inject['combined_cache'], self.inventory, vault_password=self.vault_pass) hostvars = HostVars(utils.merge_hash(inject['combined_cache'], self.extra_vars), self.inventory, vault_password=self.vault_pass)
inject['hostvars'] = hostvars inject['hostvars'] = hostvars
host_connection = inject.get('ansible_connection', self.transport) host_connection = inject.get('ansible_connection', self.transport)

Loading…
Cancel
Save