Skip to content

Commit 0769e3e

Browse files
committed
feat(openresty): add sane defaults for Debian
1 parent b45a93a commit 0769e3e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

nginx/map.jinja

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or {} %}
1414
{% do salt['defaults.merge'](defaults.nginx, osfamily) %}
1515

16+
{% if salt['pillar.get']('{}:install_from_openresty'.format(pillar_namespace), False) %}
17+
{% import_yaml tplroot ~ "/openresty.yaml" as openrestymap %}
18+
{% set openresty = salt['grains.filter_by'](openrestymap, grain='os_family') or {} %}
19+
{% do salt['defaults.merge'](defaults.nginx, openresty) %}
20+
{% endif %}
21+
1622
{% set nginx = salt['pillar.get'](pillar_namespace, default=defaults.nginx, merge=True) %}
1723

1824
{% if 'user' not in nginx.server.config %}

nginx/openresty.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
Debian:
5+
lookup:
6+
package: openresty
7+
service: openresty
8+
conf_file: /usr/local/openresty/nginx/conf/nginx.conf
9+
server_available: /usr/local/openresty/nginx/conf/sites-available
10+
server_enabled: /usr/local/openresty/nginx/conf/sites-enabled
11+
snippets_dir: /usr/local/openresty/nginx/conf/snippets
12+
pid_file: /usr/local/openresty/nginx/logs/nginx.pid
13+
install_from_openresty: true
14+
certificates_path: /usr/local/openresty/nginx/ssl
15+
server:
16+
config:
17+
http:
18+
access_log: []
19+
error_log: []

0 commit comments

Comments
 (0)