Add SUSE support and 2 small fixestags/v0.55.0
{% from "nginx/map.jinja" import nginx as nginx_map with context %} | {% from "nginx/map.jinja" import nginx as nginx_map with context %} | ||||
{% set nginx = pillar.get('nginx', {}) -%} | {% set nginx = pillar.get('nginx', {}) -%} | ||||
{% set home = nginx.get('home', '/var/www') -%} | |||||
{% set conf_dir = nginx.get('conf_dir', '/etc/nginx') -%} | |||||
{% set home = nginx.get('home', nginx_map.home) -%} | |||||
{% set conf_dir = nginx.get('conf_dir', nginx_map.conf_dir) -%} | |||||
{% set conf_template = nginx.get('conf_template', 'salt://nginx/templates/config.jinja') -%} | {% set conf_template = nginx.get('conf_template', 'salt://nginx/templates/config.jinja') -%} | ||||
{{ home }}: | {{ home }}: |
'install_prefix': '/usr/local/nginx', | 'install_prefix': '/usr/local/nginx', | ||||
'make_flags': '-j2' | 'make_flags': '-j2' | ||||
}, | }, | ||||
'Suse': { | |||||
'apache_utils': 'apache2-utils', | |||||
'group_action': 'pkg.installed', | |||||
'group_pkg': 'patterns-devel-base-devel_rpm_build', | |||||
'libpcre_dev': 'pcre-devel', | |||||
'libssl_dev': 'openssl-devel', | |||||
'pid_path': '/run/nginx.pid', | |||||
'package': 'nginx', | |||||
'default_user': 'nginx', | |||||
'default_group': 'nginx', | |||||
'disable_before_rename': True, | |||||
'old_init_disable': 'chkconfig --del nginx', | |||||
'use_upstart': False, | |||||
'use_sysvinit': False, | |||||
'home': '/srv/www', | |||||
'conf_dir': '/etc/nginx', | |||||
'log_dir': '/var/log/nginx', | |||||
'sbin_dir': '/usr/sbin', | |||||
'install_prefix': '/usr/local/nginx', | |||||
'make_flags': '-j2' | |||||
}, | |||||
}, grain='os_family', merge=salt['pillar.get']('nginx:lookup'), default='Debian') %} | }, grain='os_family', merge=salt['pillar.get']('nginx:lookup'), default='Debian') %} |
{% set error_log_level = nginx.get('error_log',{}).get('level', 'warn') -%} | {% set error_log_level = nginx.get('error_log',{}).get('level', 'warn') -%} | ||||
error_log {{ ' '.join([error_log_location, error_log_level]) }}; | error_log {{ ' '.join([error_log_location, error_log_level]) }}; | ||||
pid {{ nginx.get('pid', '/var/run/nginx.pid') }}; | pid {{ nginx.get('pid', '/var/run/nginx.pid') }}; | ||||
{% if salt['test.provider']('service') != 'systemd' -%} | |||||
{% if not 'systemd' in salt['test.provider']('service') -%} | |||||
daemon {{ nginx.get('daemon', 'on') }}; | daemon {{ nginx.get('daemon', 'on') }}; | ||||
{%- endif %} | {%- endif %} | ||||