mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Dynamic role include (#17401)
* dynamic role_include * more fixes for dynamic include roles * set play yfrom iterator when dynamic * changes from jimi-c * avoid modules that break ad hoc TODO: should really be a config
This commit is contained in:
@@ -367,13 +367,25 @@ class Templar:
|
||||
else:
|
||||
return variable
|
||||
|
||||
def templatable(self, data):
|
||||
'''
|
||||
returns True if the data can be templated w/o errors
|
||||
'''
|
||||
templatable = True
|
||||
try:
|
||||
self.template(data)
|
||||
except:
|
||||
templatable = False
|
||||
return templatable
|
||||
|
||||
def _contains_vars(self, data):
|
||||
'''
|
||||
returns True if the data contains a variable pattern
|
||||
'''
|
||||
for marker in [self.environment.block_start_string, self.environment.variable_start_string, self.environment.comment_start_string]:
|
||||
if marker in data:
|
||||
return True
|
||||
if isinstance(data, string_types):
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user