浏览代码

Drop default AdminAuth

master
Alexander Weidinger 6 年前
父节点
当前提交
00efeecd78
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. +6
    -2
      apt-cacher/ng/files/security.conf
  2. +0
    -2
      apt-cacher/ng/map.jinja

+ 6
- 2
apt-cacher/ng/files/security.conf 查看文件

@@ -7,6 +7,10 @@

# Basic authentication with username and password, required to
# visit pages with administrative functionality. Format: username:password
{% from "apt-cacher/ng/map.jinja" import apt_cacher_ng with context %}
AdminAuth: {{ apt_cacher_ng.admin_account }}:{{ apt_cacher_ng.admin_passwd }}
{%- set cfg = salt['pillar.get']('apt_cacher_ng', {}) %}
{%- set admin_account = cfg.get('admin_account', False) %}
{%- set admin_passwd = cfg.get('admin_passwd', False) %}
{%- if admin_account and admin_passwd %}
AdminAuth: {{ admin_account }}:{{ admin_passwd }}
{%- endif %}


+ 0
- 2
apt-cacher/ng/map.jinja 查看文件

@@ -13,7 +13,5 @@
'service': 'apt-cacher-ng',
'credentials': '/etc/apt-cacher-ng/security.conf',
'client_config': '/etc/apt/apt.conf.d/80proxy',
'admin_account': 'root',
'admin_passwd': 'admin'
},
}, merge=salt['pillar.get']('apt_cacher_ng')) %}

正在加载...
取消
保存