Merge pull request #275 from anderbubble/issues/274

Ignore missing servers or snippets when removing from map
This commit is contained in:
Javier Bértoli 2021-06-14 14:47:55 -03:00 committed by GitHub
commit c55120acf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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