瀏覽代碼

Merge pull request #25 from sitepoint/sitepoint

Minor fixes
tags/v0.7.0
Niels Abspoel 8 年之前
父節點
當前提交
ded0e11132
共有 6 個檔案被更改,包括 19 行新增14 行删除
  1. +6
    -1
      apt/preferences.sls
  2. +5
    -5
      apt/repositories.sls
  3. +1
    -1
      apt/templates/periodic_config.jinja
  4. +2
    -2
      apt/templates/unattended_config.jinja
  5. +1
    -1
      apt/unattended.sls
  6. +4
    -4
      pillar.example

+ 6
- 1
apt/preferences.sls 查看文件

@@ -30,9 +30,14 @@
file.managed:
- mode: '0644'
- user: root
- group: root
- group: root
- contents:
- "{{ 'Package: ' ~ p_package }}"
- "{{ 'Pin: ' ~ args.pin }}"
- "{{ 'Pin-Priority: ' ~ args.priority }}"
{% if 'explanation' in args %}
{% for explanation in args.explanation %}
- "{{ 'Explanation: ' ~ explanation }}"
{% endfor %}
{% endif %}
{% endfor %}

+ 5
- 5
apt/repositories.sls 查看文件

@@ -11,12 +11,12 @@ debian-archive-keyring:

/etc/apt/sources.list:
file.managed:
{%- if remove_sources_list %}
- contents: ''
{%- else %}
- mode: '0644'
- user: root
- group: root
{% if remove_sources_list %}
- contents: ''
- contents_newline: False
{% endif %}

{{ sources_list_dir }}:
@@ -36,7 +36,7 @@ debian-archive-keyring:
{%- for type in args.type|d(['binary']) %}
{%- set r_type = 'deb-src' if type == 'source' else 'deb' %}

{{ repo }}{{ type }}:
{{ r_type }} {{ repo }}:
pkgrepo.managed:
- name: {{ r_type }} {{ r_arch }} {{ r_url }} {{ r_distro }} {{ r_comps }}
- file: {{ sources_list_dir }}/{{ repo }}-{{ type }}.list
@@ -49,6 +49,6 @@ debian-archive-keyring:
- keyserver: {{ r_keyserver }}
{% endif %}
- clean_file: true

{%- endfor %}
{% endfor %}


+ 1
- 1
apt/templates/periodic_config.jinja 查看文件

@@ -6,7 +6,7 @@
{% set unattended_upgrade = unattended.get('unattended_upgrade', '1') -%}
{% set auto_clean_interval = unattended.get('auto_clean_interval', '7') -%}
{% set verbose = unattended.get('verbose', '2') -%}
APT::Periodic::Enable "{{ enabled }}";
APT::Periodic::Enable "{{ enabled }}";
APT::Periodic::Update-Package-Lists "{{ update_package_lists }}";
APT::Periodic::Download-Upgradeable-Packages "{{ download_upgradeable_packages }}";
APT::Periodic::Unattended-Upgrade "{{ unattended_upgrade }}";

+ 2
- 2
apt/templates/unattended_config.jinja 查看文件

@@ -14,12 +14,12 @@
Unattended-Upgrade::Allowed-Origins {
{%- for pattern in allowed_origins %}
"{{ pattern }}";
{%- endfor %}
{%- endfor %}
};
Unattended-Upgrade::Package-Blacklist {
{%- for package in package_blacklist %}
"{{ package }}";
{%- endfor %}
{%- endfor %}
};
Unattended-Upgrade::AutoFixInterruptedDpkg "{{ auto_fix_interrupted_dpkg }}";
Unattended-Upgrade::MinimalSteps "{{ minimal_steps }}";

+ 1
- 1
apt/unattended.sls 查看文件

@@ -9,7 +9,7 @@ apt_unattended_pkgs:
- pkgs:
{% for pkg in apt_map.pkgs %}
- {{ pkg }}
{% endfor %}
{% endfor %}

{{ apt_map.confd_dir }}/{{ apt_map.unattended_config }}:
file.managed:

+ 4
- 4
pillar.example 查看文件

@@ -8,11 +8,11 @@ apt:
unattended:
allowed_origins:
- origin1
- origin2
package_blacklist:
- origin2
package_blacklist:
- package1
- package2
auto_fix_interrupted_dpkg: true
- package2
auto_fix_interrupted_dpkg: true
minimal_steps: false
install_on_shutdown: false
mail: root

Loading…
取消
儲存