Browse Source

Meaningful file names and variables

master
devster31 8 years ago
parent
commit
7e5d1d1a8f
4 changed files with 8 additions and 7 deletions
  1. +6
    -5
      apt/apt_conf.sls
  2. +1
    -1
      apt/map.jinja
  3. +0
    -0
      apt/templates/apt_conf.jinja
  4. +1
    -1
      pillar.example

apt/conf.sls → apt/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 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

+ 1
- 1
apt/map.jinja View File

'preferences': {}, 'preferences': {},
'remove_preferences': false, 'remove_preferences': false,
'clean_preferences_d': false, 'clean_preferences_d': false,
'clean_conf_d': false,
'remove_apt_conf': false, 'remove_apt_conf': false,
'clean_apt_conf_d': 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',

apt/templates/conf.jinja → apt/templates/apt_conf.jinja View File


+ 1
- 1
pillar.example View File

remove_preferences: true remove_preferences: true
clean_preferences_d: true clean_preferences_d: true


conf:
apt_conf_d:
30release: 30release:
'APT::Default-Release': stable 'APT::Default-Release': stable
'40dpkg-options': '40dpkg-options':

Loading…
Cancel
Save