Sfoglia il codice sorgente

Meaningful file names and variables

master
devster31 8 anni fa
parent
commit
7e5d1d1a8f
4 ha cambiato i file con 8 aggiunte e 7 eliminazioni
  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 Vedi File

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

+ 1
- 1
apt/map.jinja Vedi File

@@ -14,8 +14,8 @@
'preferences': {},
'remove_preferences': false,
'clean_preferences_d': false,
'clean_conf_d': false,
'remove_apt_conf': false,
'clean_apt_conf_d': false,
'default_keyserver': 'pool.sks-keyservers.net',
'default_url': 'http://deb.debian.org/debian/',
'default_keyring_package': 'debian-archive-keyring',

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


+ 1
- 1
pillar.example Vedi File

@@ -8,7 +8,7 @@ apt:
remove_preferences: true
clean_preferences_d: true

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

Loading…
Annulla
Salva