瀏覽代碼

Merge pull request #275 from anderbubble/issues/274

Ignore missing servers or snippets when removing from map
tags/v2.7.2
Javier Bértoli 3 年之前
父節點
當前提交
c55120acf2
No account linked to committer's email address
共有 3 個文件被更改,包括 5 次插入4 次删除
  1. +1
    -0
      nginx/certificates.sls
  2. +2
    -2
      nginx/servers_config.sls
  3. +2
    -2
      nginx/snippets.sls

+ 1
- 0
nginx/certificates.sls 查看文件

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

+ 2
- 2
nginx/servers_config.sls 查看文件

{% 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.

+ 2
- 2
nginx/snippets.sls 查看文件



{#- _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:

Loading…
取消
儲存