mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
parent
b0e6baf8c3
commit
cf2a66ef30
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,7 @@ except ImportError:
|
||||||
from sha import sha as sha1
|
from sha import sha as sha1
|
||||||
|
|
||||||
from ansible import constants as C
|
from ansible import constants as C
|
||||||
|
from ansible.cli import CLI
|
||||||
from ansible.errors import *
|
from ansible.errors import *
|
||||||
from ansible.parsing import DataLoader
|
from ansible.parsing import DataLoader
|
||||||
from ansible.plugins.cache import FactCache
|
from ansible.plugins.cache import FactCache
|
||||||
|
@ -244,6 +245,8 @@ class VariableManager:
|
||||||
# the 'omit' value alows params to be left out if the variable they are based on is undefined
|
# the 'omit' value alows params to be left out if the variable they are based on is undefined
|
||||||
all_vars['omit'] = self._omit_token
|
all_vars['omit'] = self._omit_token
|
||||||
|
|
||||||
|
all_vars['ansible_version'] = CLI.version_info(gitinfo=False)
|
||||||
|
|
||||||
# make vars self referential, so people can do things like 'vars[var_name]'
|
# make vars self referential, so people can do things like 'vars[var_name]'
|
||||||
copied_vars = all_vars.copy()
|
copied_vars = all_vars.copy()
|
||||||
if 'hostvars' in copied_vars:
|
if 'hostvars' in copied_vars:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue