Skip to content

Commit 0a92bb5

Browse files
committed
Trust systemd unit template
With ansible 2.19 jinja templating changes, data that can contain templates will require explicit trust via trust_as_template to be allowed to render. Signed-off-by: rabi <ramishra@redhat.com>
1 parent fc882de commit 0a92bb5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/action/container_systemd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
from ansible.errors import AnsibleActionFail
2727
from ansible.plugins.action import ActionBase
28+
from ansible.template import trust_as_template
2829
from ansible.utils.display import Display
2930

3031

@@ -203,7 +204,7 @@ def _get_unit_template(self):
203204
raise AnsibleActionFail('Template {} was '
204205
'not found'.format(source))
205206
with open(source) as template_file:
206-
data = template_file.read()
207+
data = trust_as_template(template_file.read())
207208
return data
208209

209210
def _create_units(self, container_config, task_vars):

0 commit comments

Comments
 (0)