Merge pull request #75 from aboe76/enable_values_absent

added test for value None, to be an absent value
This commit is contained in:
Forrest 2015-02-11 21:49:27 -08:00
commit eed147836d

View File

@ -1,6 +1,7 @@
{% set indent_increment = 4 %}
{%- macro nginx_block(value, key=None, operator=' ', delim=';', ind=0) -%}
{%- if value != None -%}
{%- if value is number or value is string -%}
{{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }}
{%- elif value is mapping -%}
@ -16,6 +17,8 @@
{%- else -%}
{{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }}
{%- endif -%}
{%- else -%}
{%- endif -%}
{%- endmacro -%}
# Default nginx server configuration