{% set nginx = salt['grains.filter_by']({ 'Debian': { 'apache_utils': 'apache2-utils', 'group_action': 'pkg.installed', 'group_pkg': 'build-essential', 'libpcre_dev': 'libpcre3-dev', 'libssl_dev': 'libssl-dev', 'pid_path': '/var/run/nginx.pid', 'package': 'nginx-full', 'default_user': 'www-data', 'default_group': 'www-data', 'disable_before_rename': False, 'old_init_disable': 'update-rc.d -f nginx remove', 'use_upstart': True, 'use_sysvinit': False, 'home': '/var/www', 'conf_dir': '/etc/nginx', 'log_dir': '/var/log/nginx', 'sbin_dir': '/usr/sbin', 'install_prefix': '/usr/local/nginx', 'make_flags': '-j2' }, 'RedHat': { 'apache_utils': 'httpd-tools', 'group_action': 'pkg.group_installed', 'group_pkg': 'Development Tools', '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': True, 'use_sysvinit': False, 'home': '/var/www', 'conf_dir': '/etc/nginx', 'log_dir': '/var/log/nginx', 'sbin_dir': '/usr/sbin', 'install_prefix': '/usr/local/nginx', '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') %}