Skip to content

Commit f9000dd

Browse files
Merge pull request #240 from sticky-note/fix/snippets-file-name
fix(snippet-file-name): removed appending of ".conf" for snippets files
2 parents a5faf70 + aa87721 commit f9000dd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

nginx/snippets.sls

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ nginx_snippets_dir:
1414
{% for snippet, config in nginx.snippets.items() %}
1515
nginx_snippet_{{ snippet }}:
1616
file.managed:
17-
- name: {{ nginx.lookup.snippets_dir ~ '/' ~ snippet ~ '.conf' }}
17+
- name: {{ nginx.lookup.snippets_dir ~ '/' ~ snippet }}
1818
- source: {{ files_switch([ snippet, 'server.conf' ],
1919
'nginx_snippet_file_managed'
2020
)

pillar.example

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ nginx:
6363
## Files or Templates can be retrieved by TOFS with snippet name ( Fallback to server.conf )
6464
##--- --- - - - - - - -- - - -- -- - - --- -- - -- - - - -- - - - - -- - - - -- - - - -- - ##
6565
snippets:
66-
letsencrypt:
66+
letsencrypt.conf:
6767
- location ^~ /.well-known/acme-challenge/:
6868
- proxy_pass: http://localhost:9999
69-
cloudflare_proxy:
69+
cloudflare_proxy.conf:
7070
- set_real_ip_from: 103.21.244.0/22
7171
- set_real_ip_from: 103.22.200.0/22
7272
- set_real_ip_from: 104.16.0.0/12
7373
- set_real_ip_from: 108.162.192.0/18
74-
blacklist:
74+
blacklist.conf:
7575
- map $http_user_agent $bad_bot:
7676
- default: 0
7777
- '~*^Lynx': 0
@@ -81,7 +81,7 @@ nginx:
8181
- '~*bandit': 1
8282
- libwww-perl: 1
8383
- '~(?i)(httrack|htmlparser|libwww)': 1
84-
upstream_netdata_tcp:
84+
upstream_netdata_tcp.conf:
8585
- upstream netdata:
8686
- server: 127.0.0.1:19999
8787
- keepalive: 64

test/salt/default/pillar/nginx.sls

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
nginx:
88
snippets:
9-
letsencrypt:
9+
letsencrypt.conf:
1010
- location ^~ /.well-known/acme-challenge/:
1111
- proxy_pass: http://localhost:9999
1212
server:

0 commit comments

Comments
 (0)