瀏覽代碼

Merge pull request #32 from jaanush/master

Added map file to resolve apache utils package name
susefix
Joseph Hall 10 年之前
父節點
當前提交
3a63a8c2bd
共有 2 個檔案被更改,包括 10 行新增2 行删除
  1. +8
    -0
      nginx/map.jinja
  2. +2
    -2
      nginx/users.sls

+ 8
- 0
nginx/map.jinja 查看文件

@@ -0,0 +1,8 @@
{% 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 查看文件

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

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

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

Loading…
取消
儲存