1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixed shared 'compose' method for inventory plugins

This commit is contained in:
Brian Coca 2017-05-28 10:37:06 -04:00
parent e19109fb3d
commit 46a3e6088b

View file

@ -84,8 +84,8 @@ class BaseInventoryPlugin(object):
def _compose(self, template, variables): def _compose(self, template, variables):
''' helper method for pluigns to compose variables for Ansible based on jinja2 expression and inventory vars''' ''' helper method for pluigns to compose variables for Ansible based on jinja2 expression and inventory vars'''
t = Templar(loader=self.loader, variables=variables, disable_lookups=True) t = Templar(loader=self.loader, variables=variables)
return t.do_template(template) return t.do_template('%s%s%s' % (t.environment.variable_start_string,template,t.environment.variable_end_string), disable_lookups=True)