Skip to content

Commit

Permalink
fix(snippets): removed appending of ".conf"
Browse files Browse the repository at this point in the history
(...) for snippets filename.
BREAKING CHANGE: Users have to modify their pillar
according to this commit. Users MUST append '.conf' for their
existing managed snippets.
  • Loading branch information
nb authored and domo690 committed Jun 19, 2019
1 parent a5faf70 commit aa87721
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nginx/snippets.sls
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ nginx_snippets_dir:
{% for snippet, config in nginx.snippets.items() %}
nginx_snippet_{{ snippet }}:
file.managed:
- name: {{ nginx.lookup.snippets_dir ~ '/' ~ snippet ~ '.conf' }}
- name: {{ nginx.lookup.snippets_dir ~ '/' ~ snippet }}
- source: {{ files_switch([ snippet, 'server.conf' ],
'nginx_snippet_file_managed'
)
Expand Down
8 changes: 4 additions & 4 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ nginx:
## Files or Templates can be retrieved by TOFS with snippet name ( Fallback to server.conf )
##--- --- - - - - - - -- - - -- -- - - --- -- - -- - - - -- - - - - -- - - - -- - - - -- - ##
snippets:
letsencrypt:
letsencrypt.conf:
- location ^~ /.well-known/acme-challenge/:
- proxy_pass: http://localhost:9999
cloudflare_proxy:
cloudflare_proxy.conf:
- set_real_ip_from: 103.21.244.0/22
- set_real_ip_from: 103.22.200.0/22
- set_real_ip_from: 104.16.0.0/12
- set_real_ip_from: 108.162.192.0/18
blacklist:
blacklist.conf:
- map $http_user_agent $bad_bot:
- default: 0
- '~*^Lynx': 0
Expand All @@ -81,7 +81,7 @@ nginx:
- '~*bandit': 1
- libwww-perl: 1
- '~(?i)(httrack|htmlparser|libwww)': 1
upstream_netdata_tcp:
upstream_netdata_tcp.conf:
- upstream netdata:
- server: 127.0.0.1:19999
- keepalive: 64
Expand Down
2 changes: 1 addition & 1 deletion test/salt/default/pillar/nginx.sls
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

nginx:
snippets:
letsencrypt:
letsencrypt.conf:
- location ^~ /.well-known/acme-challenge/:
- proxy_pass: http://localhost:9999
server:
Expand Down

0 comments on commit aa87721

Please sign in to comment.