mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Adds 'ansible_check_mode' boolean magic variable
* Makes it possible to pass any options variable to VariableManager by changing `load_options_vars(options)` in `lib/ansible/utils/vars.py`
This commit is contained in:
@@ -111,6 +111,13 @@ def load_extra_vars(loader, options):
|
||||
extra_vars = combine_vars(extra_vars, data)
|
||||
return extra_vars
|
||||
|
||||
def load_options_vars(options):
|
||||
options_vars = {}
|
||||
# For now only return check mode, but we can easily return more
|
||||
# options if we need variables for them
|
||||
options_vars['ansible_check_mode'] = options.check
|
||||
return options_vars
|
||||
|
||||
def isidentifier(ident):
|
||||
"""
|
||||
Determines, if string is valid Python identifier using the ast module.
|
||||
|
||||
Reference in New Issue
Block a user