Browse Source

Remove apt.conf if requested

master
devster31 8 years ago
parent
commit
5cbec8ef6b
2 changed files with 9 additions and 2 deletions
  1. +7
    -1
      apt/conf.sls
  2. +2
    -1
      apt/map.jinja

+ 7
- 1
apt/conf.sls View File

{% 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 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 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 apt_conf = salt['pillar.get']('apt:conf', apt_map.conf) %}
{% if remove_apt_conf %}
/etc/apt/apt.conf:
file:
- absent
{% endif %}


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

+ 2
- 1
apt/map.jinja View File

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

Loading…
Cancel
Save