Ignore missing servers or snippets when removing from maptags/v2.7.2
@@ -30,6 +30,7 @@ generate_nginx_dhparam_{{ dh_param }}_key: | |||
- creates: {{ certificates_path }}/{{ dh_param }} | |||
- require: | |||
- file: prepare_certificates_path_dir | |||
- pkg: generate_nginx_dhparam_{{ dh_param }}_key | |||
- watch_in: | |||
- service: nginx_service | |||
{%- endif %} |
@@ -10,8 +10,8 @@ | |||
{% set server_states = [] %} | |||
{#- _nginx is a lightened copy of nginx map intended to passed in templates #} | |||
{%- set _nginx = nginx.copy() %} | |||
{%- do _nginx.pop('snippets') %} | |||
{%- do _nginx.pop('servers') %} | |||
{%- do _nginx.pop('snippets') if nginx.snippets is defined %} | |||
{%- do _nginx.pop('servers') if nginx.servers is defined %} | |||
# Simple path concatenation. | |||
# Needs work to make this function on windows. |
@@ -8,8 +8,8 @@ | |||
{#- _nginx is a lightened copy of nginx map intended to passed in templates #} | |||
{%- set _nginx = nginx.copy() %} | |||
{%- do _nginx.pop('snippets') %} | |||
{%- do _nginx.pop('servers') %} | |||
{%- do _nginx.pop('snippets') if nginx.snippets is defined %} | |||
{%- do _nginx.pop('servers') if nginx.servers is defined %} | |||
nginx_snippets_dir: | |||
file.directory: |