Sfoglia il codice sorgente

Remove apt.conf if requested

master
devster31 8 anni fa
parent
commit
5cbec8ef6b
2 ha cambiato i file con 9 aggiunte e 2 eliminazioni
  1. +7
    -1
      apt/conf.sls
  2. +2
    -1
      apt/map.jinja

+ 7
- 1
apt/conf.sls Vedi File

@@ -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 Vedi File

@@ -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') %}

Loading…
Annulla
Salva