From 805f768dab8e01dcad91ea11f571a70b8ab64f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannig=20Perr=C3=A9?= Date: Mon, 2 Nov 2015 07:57:44 +0100 Subject: [PATCH] Clear cache when updating template variables. --- lib/ansible/template/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index 165b9e0e964..eded032c7cc 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -260,6 +260,8 @@ class Templar: assert isinstance(variables, dict) self._available_variables = variables.copy() + # Clearing cache + self._cached_result = {} def template(self, variable, convert_bare=False, preserve_trailing_newlines=True, escape_backslashes=True, fail_on_undefined=None, overrides=None, convert_data=True): '''