Merge pull request #240 from sticky-note/fix/snippets-file-name

fix(snippet-file-name): removed appending of ".conf" for snippets files
This commit is contained in:
N 2019-06-19 08:33:27 +01:00 committed by GitHub
commit f9000dd4f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ nginx_snippets_dir:
{% for snippet, config in nginx.snippets.items() %} {% for snippet, config in nginx.snippets.items() %}
nginx_snippet_{{ snippet }}: nginx_snippet_{{ snippet }}:
file.managed: file.managed:
- name: {{ nginx.lookup.snippets_dir ~ '/' ~ snippet ~ '.conf' }} - name: {{ nginx.lookup.snippets_dir ~ '/' ~ snippet }}
- source: {{ files_switch([ snippet, 'server.conf' ], - source: {{ files_switch([ snippet, 'server.conf' ],
'nginx_snippet_file_managed' 'nginx_snippet_file_managed'
) )

View File

@ -63,15 +63,15 @@ nginx:
## Files or Templates can be retrieved by TOFS with snippet name ( Fallback to server.conf ) ## Files or Templates can be retrieved by TOFS with snippet name ( Fallback to server.conf )
##--- --- - - - - - - -- - - -- -- - - --- -- - -- - - - -- - - - - -- - - - -- - - - -- - ## ##--- --- - - - - - - -- - - -- -- - - --- -- - -- - - - -- - - - - -- - - - -- - - - -- - ##
snippets: snippets:
letsencrypt: letsencrypt.conf:
- location ^~ /.well-known/acme-challenge/: - location ^~ /.well-known/acme-challenge/:
- proxy_pass: http://localhost:9999 - proxy_pass: http://localhost:9999
cloudflare_proxy: cloudflare_proxy.conf:
- set_real_ip_from: 103.21.244.0/22 - set_real_ip_from: 103.21.244.0/22
- set_real_ip_from: 103.22.200.0/22 - set_real_ip_from: 103.22.200.0/22
- set_real_ip_from: 104.16.0.0/12 - set_real_ip_from: 104.16.0.0/12
- set_real_ip_from: 108.162.192.0/18 - set_real_ip_from: 108.162.192.0/18
blacklist: blacklist.conf:
- map $http_user_agent $bad_bot: - map $http_user_agent $bad_bot:
- default: 0 - default: 0
- '~*^Lynx': 0 - '~*^Lynx': 0
@ -81,7 +81,7 @@ nginx:
- '~*bandit': 1 - '~*bandit': 1
- libwww-perl: 1 - libwww-perl: 1
- '~(?i)(httrack|htmlparser|libwww)': 1 - '~(?i)(httrack|htmlparser|libwww)': 1
upstream_netdata_tcp: upstream_netdata_tcp.conf:
- upstream netdata: - upstream netdata:
- server: 127.0.0.1:19999 - server: 127.0.0.1:19999
- keepalive: 64 - keepalive: 64

View File

@ -6,7 +6,7 @@
nginx: nginx:
snippets: snippets:
letsencrypt: letsencrypt.conf:
- location ^~ /.well-known/acme-challenge/: - location ^~ /.well-known/acme-challenge/:
- proxy_pass: http://localhost:9999 - proxy_pass: http://localhost:9999
server: server: