Skip to content

Instantly share code, notes, and snippets.

@mjinks
Last active September 25, 2015 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjinks/b40e11cc57d6b2f823a7 to your computer and use it in GitHub Desktop.
Save mjinks/b40e11cc57d6b2f823a7 to your computer and use it in GitHub Desktop.
Teach me to fish...
There is no bare "l" anywhere in the pillar that we're referencing.
{% for name, conf in pillar.get('vsftpd_user_config', {}).iteritems() if conf.absent is not defined or not conf.absent %}
{{ name }}_vsftpd_user_conf:
[...]
NameError: global name 'l_vsftpd_user_config' is not defined
; line 52
---
[...]
{%- set value = config_dict.get(keyword, default) -%}
{%- if value is string or value is number -%}
{{ keyword }}={{ value }}
{%- else -%}
{%- for single_value in value -%}
{{ keyword }}={{ single_value }} <======================
{% endfor -%}
{%- endif -%}
{%- endmacro -%}
{#- macros for render option according to present -#}
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment