mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 07:24:00 -07:00
Re-adding capability of tasks to see a unique view of their own defaults
This commit is contained in:
parent
6dd3505c9e
commit
02b7b79d7e
2 changed files with 23 additions and 14 deletions
|
@ -41,7 +41,7 @@ class Task(object):
|
|||
'any_errors_fatal', 'changed_when', 'always_run'
|
||||
]
|
||||
|
||||
def __init__(self, play, ds, module_vars=None, additional_conditions=None):
|
||||
def __init__(self, play, ds, module_vars=None, default_vars=None, additional_conditions=None):
|
||||
''' constructor loads from a task or handler datastructure '''
|
||||
|
||||
# meta directives are used to tell things like ansible/playbook to run
|
||||
|
@ -101,8 +101,8 @@ class Task(object):
|
|||
raise errors.AnsibleError("%s is not a legal parameter in an Ansible task or handler" % x)
|
||||
|
||||
self.module_vars = module_vars
|
||||
self.default_vars = default_vars
|
||||
self.play = play
|
||||
self.default_vars = play.default_vars
|
||||
|
||||
# load various attributes
|
||||
self.name = ds.get('name', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue