Quellcode durchsuchen

added test for value None, to be an absent value

this is needed on archlinux where the pid file is set by systemd
not the nginx.conf file.

In the pillar file you just add
  pid:

an value of 'None' and no pid entry in nginx.conf.
this now works with every None value set in the pillar file
tags/v0.55.0
Niels Abspoel vor 10 Jahren
Ursprung
Commit
4a976bf1ab
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. +3
    -0
      nginx/ng/files/nginx.conf

+ 3
- 0
nginx/ng/files/nginx.conf Datei anzeigen

@@ -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

Laden…
Abbrechen
Speichern