Skip to content

Instantly share code, notes, and snippets.

@pirogoeth
Created September 23, 2015 16:05
Show Gist options
  • Select an option

  • Save pirogoeth/f7892e5f64862e005a5c to your computer and use it in GitHub Desktop.

Select an option

Save pirogoeth/f7892e5f64862e005a5c to your computer and use it in GitHub Desktop.
### nginx:map.jinja ###
{% set nginx = salt['grains.filter_by']({
'default' : {
'package' : 'nginx',
'base_d' : '/etc/nginx',
'config_path' : '/etc/nginx/nginx.conf',
'conf_d' : '/etc/nginx/conf.d',
'log_d' : '/var/log/nginx',
'sites_d' : '/etc/nginx/sites.d',
'var_d' : '/var/nginx',
'www_user' : 'www-data',
'www_group' : 'www-data',
},
'Debian' : {
'package' : 'nginx',
'base_d' : '/etc/nginx',
'config_path' : '/etc/nginx/nginx.conf',
'conf_d' : '/etc/nginx/conf.d',
'log_d' : '/var/log/nginx',
'sites_d' : '/etc/nginx/sites.d',
'var_d' : '/var/nginx',
'www_user' : 'www-data',
'www_group' : 'www-data',
},
'FreeBSD' : {
'package' : 'nginx',
'base_d' : '/usr/local/etc/nginx',
'config_path' : '/usr/local/etc/nginx/nginx.conf',
'conf_d' : '/usr/local/etc/nginx/conf.d',
'log_d' : '/var/log/nginx',
'sites_d' : '/usr/local/etc/nginx/sites.d',
'var_d' : '/var/nginx',
'www_user' : 'www',
'www_group' : 'www',
},
},
merge = salt['pillar.get']('nginx:lookup'), default = 'default') %}
omega.internal.maio.me:
- Rendering SLS "base:core" failed: Traceback (most recent call last):
- File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 77, in render_tmpl
- output = render_str(tmplstr, context, tmplpath)
- File "/usr/lib/python2.7/dist-packages/salt/utils/templates.py", line 169, in render_jinja_tmpl
- output = jinja_env.from_string(tmplstr).render(**unicode_context)
- File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
- return self.environment.handle_exception(exc_info, True)
- File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
- reraise(exc_type, exc_value, tb)
- File "<template>", line 3, in top-level template code
- File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1013, in make_module
- return TemplateModule(self, self.new_context(vars, shared, locals))
- File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1070, in __init__
- self._body_stream = list(template.root_render_func(context))
- File "/var/cache/salt/minion/files/base/core/map.jinja", line 3, in top-level template code
- {% set core = salt['grains.filter_by']({
- TypeError: filter_by() got an unexpected keyword argument 'default'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment