Browse Source

Merge pull request #75 from aboe76/enable_values_absent

added test for value None, to be an absent value
tags/v0.55.0
Forrest 10 years ago
parent
commit
eed147836d
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      nginx/ng/files/nginx.conf

+ 3
- 0
nginx/ng/files/nginx.conf View File

{% set indent_increment = 4 %} {% set indent_increment = 4 %}


{%- macro nginx_block(value, key=None, operator=' ', delim=';', ind=0) -%} {%- macro nginx_block(value, key=None, operator=' ', delim=';', ind=0) -%}
{%- if value != None -%}
{%- if value is number or value is string -%} {%- if value is number or value is string -%}
{{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }} {{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }}
{%- elif value is mapping -%} {%- elif value is mapping -%}
{%- else -%} {%- else -%}
{{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }} {{ key|indent(ind, True) }}{{ operator }}{{ value }}{{ delim }}
{%- endif -%} {%- endif -%}
{%- else -%}
{%- endif -%}
{%- endmacro -%} {%- endmacro -%}


# Default nginx server configuration # Default nginx server configuration

Loading…
Cancel
Save