|
|
|
|
|
|
|
|
{% from "apt/map.jinja" import apt as apt_map with context %} |
|
|
{% 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 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 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 %} |
|
|
{% if remove_apt_conf %} |
|
|
/etc/apt/apt.conf: |
|
|
/etc/apt/apt.conf: |
|
|
file: |
|
|
file: |
|
|
|
|
|
|
|
|
- mode: 755 |
|
|
- mode: 755 |
|
|
- user: root |
|
|
- user: root |
|
|
- group: 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 }}: |
|
|
{{ confd_dir }}/{{ file }}: |
|
|
file.managed: |
|
|
file.managed: |
|
|
- source: salt://apt/templates/conf.jinja |
|
|
|
|
|
|
|
|
- source: salt://apt/templates/apt_conf.jinja |
|
|
- template: jinja |
|
|
- template: jinja |
|
|
- user: root |
|
|
- user: root |
|
|
- group: root |
|
|
- group: root |