def renderer(path=None, string=None, default_renderer='jinja|yaml', **kwargs):
 if ((not path) and (not string)):
  raise salt.exceptions.SaltInvocationError('Must pass either path or string')
 renderers = salt.loader.render(__opts__, __salt__)
 if path:
  path_or_string = path
 elif string:
  path_or_string = ':string:'
  kwargs['input_data'] = string
 return salt.template.compile_template(path_or_string, renderers, default_renderer, __opts__['renderer_blacklist'], __opts__['renderer_whitelist'], **kwargs)

def renderer ( path = None , string = None , default_renderer = 'jinja|yaml' , ** kwargs ) : if ( ( not path ) and ( not string ) ) : raise salt . exceptions . SaltInvocationError ( 'Must pass either path or string' ) renderers = salt . loader . render ( __opts__ , __salt__ ) if path : path_or_string = path elif string : path_or_string = ':string:' kwargs [ 'input_data' ] = string return salt . template . compile_template ( path_or_string , renderers , default_renderer , __opts__ [ 'renderer_blacklist' ] , __opts__ [ 'renderer_whitelist' ] , ** kwargs )
parse a string or file through salts renderer system this is an open-ended function and can be used for a variety of tasks .