mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Added additional template variables
Added two additional template variables * template_fullpath - absolute path to the template * template_run_date - date that the template was rendered Documented these additional variables in the module documentation
This commit is contained in:
@@ -303,6 +303,8 @@ def template_from_file(basedir, path, vars):
|
||||
vars['template_path'] = realpath
|
||||
vars['template_mtime'] = datetime.datetime.fromtimestamp(os.path.getmtime(realpath))
|
||||
vars['template_uid'] = template_uid
|
||||
vars['template_fullpath'] = os.path.abspath(realpath)
|
||||
vars['template_run_date'] = datetime.datetime.now()
|
||||
|
||||
managed_default = C.DEFAULT_MANAGED_STR
|
||||
managed_str = managed_default.format(
|
||||
|
||||
Reference in New Issue
Block a user