207 # Complex groups based on jinja2 conditionals, hosts that meet the conditional are added to group 208 self._add_host_to_composed_groups(self.get_option('groups'), server, server['name'], strict=strict)
367 def _add_host_to_composed_groups(self, groups, variables, host, strict=False): 368 ''' helper to create complex groups for plugins based on jinja2 conditionals, hosts that meet the conditional are added to group''' 369 # process each 'group entry' 370 if groups and isinstance(groups, dict): 371 variables = combine_vars(variables, self.inventory.get_host(host).get_vars()) 372 self.templar.available_variables = variables 373 for group_name in groups: 374 import pdb;pdb.set_trace() 375 conditional = "{%% if %s %%} True {%% else %%} False {%% endif %%}" % groups[group_name]