Ignore missing servers or snippets when removing from maptags/v2.7.2
- creates: {{ certificates_path }}/{{ dh_param }} | - creates: {{ certificates_path }}/{{ dh_param }} | ||||
- require: | - require: | ||||
- file: prepare_certificates_path_dir | - file: prepare_certificates_path_dir | ||||
- pkg: generate_nginx_dhparam_{{ dh_param }}_key | |||||
- watch_in: | - watch_in: | ||||
- service: nginx_service | - service: nginx_service | ||||
{%- endif %} | {%- endif %} |
{% set server_states = [] %} | {% set server_states = [] %} | ||||
{#- _nginx is a lightened copy of nginx map intended to passed in templates #} | {#- _nginx is a lightened copy of nginx map intended to passed in templates #} | ||||
{%- set _nginx = nginx.copy() %} | {%- 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. | # Simple path concatenation. | ||||
# Needs work to make this function on windows. | # Needs work to make this function on windows. |
{#- _nginx is a lightened copy of nginx map intended to passed in templates #} | {#- _nginx is a lightened copy of nginx map intended to passed in templates #} | ||||
{%- set _nginx = nginx.copy() %} | {%- 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: | nginx_snippets_dir: | ||||
file.directory: | file.directory: |