From 6102a4b9b49a9f1f33ad1f7359dfd344dbbca8fa Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 16 Feb 2016 09:42:33 -0500 Subject: [PATCH] template also when only comments present --- lib/ansible/template/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index bec34f81aa..2b07bcae20 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -370,7 +370,10 @@ class Templar: ''' returns True if the data contains a variable pattern ''' - return self.environment.block_start_string in data or self.environment.variable_start_string in data + for marker in [self.environment.block_start_string, self.environment.variable_start_string, self.environment.comment_start_string]: + if marker in data: + return True + return False def _convert_bare_variable(self, variable, bare_deprecated): '''