Browse Source

Templar: use available_variables

This aims to resolve deprecation warning: set_available_variables is
being deprecated. Use "@available_variables.setter" instead

Change-Id: I95191ad596656051bd6a2ba8dd720823ea3434ec
changes/04/735404/1
Dmitriy Rabotyagov 1 month ago
parent
commit
170e46b44d
1 changed files with 1 additions and 6 deletions
  1. +1
    -6
      action/config_template.py

+ 1
- 6
action/config_template.py View File

@@ -865,14 +865,9 @@ class ActionModule(ActionBase):
).decode('utf-8')

self._templar.environment.loader.searchpath = _vars['searchpath']
self._templar.set_available_variables(temp_vars)
self._templar.available_variables = temp_vars
resultant = self._check_templar(data=template_data)

# Access to protected method is unavoidable in Ansible
self._templar.set_available_variables(
self._templar._available_variables
)

type_merger = getattr(self, CONFIG_TYPES.get(_vars['config_type']))
resultant, config_base = type_merger(
config_overrides=_vars['config_overrides'],


Loading…
Cancel
Save