浏览代码

Remove apt.conf if requested

master
devster31 8 年前
父节点
当前提交
5cbec8ef6b
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. +7
    -1
      apt/conf.sls
  2. +2
    -1
      apt/map.jinja

+ 7
- 1
apt/conf.sls 查看文件

@@ -1,11 +1,17 @@
{% from "apt/map.jinja" import apt as apt_map with context %}
{% set remove_apt_conf = salt['pillar.get']('apt:remove_apt_conf', apt_map.remove_apt_conf) %}
{% set confd_dir = salt['pillar.get']('apt:confd_dir', apt_map.confd_dir) %}
{% set clean_conf_d = salt['pillar.get']('apt:clean_conf_d', apt_map.clean_conf_d) %}
{% set apt_conf = salt['pillar.get']('apt:conf', apt_map.conf) %}
{% if remove_apt_conf %}
/etc/apt/apt.conf:
file:
- absent
{% endif %}

{{ confd_dir }}:
file.directory:
- mode: '0755'
- mode: 755
- user: root
- group: root
- clean: {{ clean_conf_d }}

+ 2
- 1
apt/map.jinja 查看文件

@@ -15,6 +15,7 @@
'remove_preferences': false,
'clean_preferences_d': false,
'clean_conf_d': false,
'remove_apt_conf': false,
'default_keyserver': 'pool.sks-keyservers.net',
'default_url': 'http://deb.debian.org/debian/',
'default_keyring_package': 'debian-archive-keyring',
@@ -31,6 +32,6 @@
'arch': arch,
'comps': ['main'],
},
},
},
},
}, merge=salt['pillar.get']('apt:lookup'), default='Debian') %}

正在加载...
取消
保存