|
|
@@ -1,8 +1,9 @@ |
|
|
|
{% 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) %} |
|
|
|
{% set clean_apt_conf_d = salt['pillar.get']('apt:clean_apt_conf_d', apt_map.clean_apt_conf_d) %} |
|
|
|
{% set apt_conf_d = salt['pillar.get']('apt:apt_conf_d', apt_map.apt_conf_d) %} |
|
|
|
|
|
|
|
{% if remove_apt_conf %} |
|
|
|
/etc/apt/apt.conf: |
|
|
|
file: |
|
|
@@ -14,12 +15,12 @@ |
|
|
|
- mode: 755 |
|
|
|
- user: root |
|
|
|
- group: root |
|
|
|
- clean: {{ clean_conf_d }} |
|
|
|
- clean: {{ clean_apt_conf_d }} |
|
|
|
|
|
|
|
{% for file, contents in apt_conf|dictsort %} |
|
|
|
{% for file, contents in apt_conf_d|dictsort %} |
|
|
|
{{ confd_dir }}/{{ file }}: |
|
|
|
file.managed: |
|
|
|
- source: salt://apt/templates/conf.jinja |
|
|
|
- source: salt://apt/templates/apt_conf.jinja |
|
|
|
- template: jinja |
|
|
|
- user: root |
|
|
|
- group: root |