Browse Source

Merge pull request #32 from jaanush/master

Added map file to resolve apache utils package name
tags/v0.55.0
Joseph Hall 10 years ago
parent
commit
3a63a8c2bd
2 changed files with 10 additions and 2 deletions
  1. +8
    -0
      nginx/map.jinja
  2. +2
    -2
      nginx/users.sls

+ 8
- 0
nginx/map.jinja View File

{% set nginx = salt['grains.filter_by']({
'Debian': {
'apache_utils': 'apache2-utils',
},
'RedHat': {
'apache_utils': 'httpd-tools',
},
}, merge=salt['pillar.get']('nginx:lookup')) %}

+ 2
- 2
nginx/users.sls View File

{% set nginx = pillar.get('nginx', {}) -%}
{% from "nginx/map.jinja" import nginx with context %}
{% set htauth = nginx.get('htpasswd', '/etc/nginx/.htpasswd') -%} {% set htauth = nginx.get('htpasswd', '/etc/nginx/.htpasswd') -%}


htpasswd: htpasswd:
pkg.installed: pkg.installed:
- name: apache2-utils
- name: {{ nginx.apache_utils }}


{% for name, user in pillar.get('users', {}).items() %} {% for name, user in pillar.get('users', {}).items() %}
{% if user['webauth'] is defined -%} {% if user['webauth'] is defined -%}

Loading…
Cancel
Save