mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Merge branch 'smoothify-defaults' into devel
This commit is contained in:
@@ -130,6 +130,7 @@ class Runner(object):
|
||||
sudo=False, # whether to run sudo or not
|
||||
sudo_user=C.DEFAULT_SUDO_USER, # ex: 'root'
|
||||
module_vars=None, # a playbooks internals thing
|
||||
default_vars=None, # ditto
|
||||
is_playbook=False, # running from playbook or not?
|
||||
inventory=None, # reference to Inventory object
|
||||
subset=None, # subset pattern
|
||||
@@ -158,6 +159,7 @@ class Runner(object):
|
||||
self.inventory = utils.default(inventory, lambda: ansible.inventory.Inventory(host_list))
|
||||
|
||||
self.module_vars = utils.default(module_vars, lambda: {})
|
||||
self.default_vars = utils.default(default_vars, lambda: {})
|
||||
self.always_run = None
|
||||
self.connector = connection.Connection(self)
|
||||
self.conditional = conditional
|
||||
@@ -404,6 +406,7 @@ class Runner(object):
|
||||
port = self.remote_port
|
||||
|
||||
inject = {}
|
||||
inject = utils.combine_vars(inject, self.default_vars)
|
||||
inject = utils.combine_vars(inject, host_variables)
|
||||
inject = utils.combine_vars(inject, self.module_vars)
|
||||
inject = utils.combine_vars(inject, self.setup_cache[host])
|
||||
@@ -412,6 +415,7 @@ class Runner(object):
|
||||
inject['group_names'] = host_variables.get('group_names', [])
|
||||
inject['groups'] = self.inventory.groups_list()
|
||||
inject['vars'] = self.module_vars
|
||||
inject['defaults'] = self.default_vars
|
||||
inject['environment'] = self.environment
|
||||
|
||||
if self.inventory.basedir() is not None:
|
||||
|
||||
Reference in New Issue
Block a user