Skip to content

Commit aa87721

Browse files
nbdomo690
nb
authored andcommitted
fix(snippets): removed appending of ".conf"
(...) for snippets filename. BREAKING CHANGE: Users have to modify their pillar according to this commit. Users MUST append '.conf' for their existing managed snippets.
1 parent a5faf70 commit aa87721

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: 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
)

Diff for: 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

Diff for: 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)