浏览代码

Merge pull request #26 from kakwa/ADD_UNATTENDED_ORIGINS_PATTERN

adding support for Origins-Pattern in unattended upgrade
tags/v0.7.0
Niels Abspoel 7 年前
父节点
当前提交
ef4f23fc5f
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. +6
    -0
      apt/templates/unattended_config.jinja
  2. +4
    -0
      pillar.example

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

@@ -1,6 +1,7 @@
{% set apt = pillar.get('apt', {}) -%}
{% set unattended = apt.get('unattended', {}) -%}
{% set allowed_origins = unattended.get('allowed_origins', ['${distro_id}:${distro_codename}-security']) -%}
{% set origins_patterns = unattended.get('origins_patterns', ['origin=Debian,archive=stable,label=Debian-Security']) -%}
{% set package_blacklist = unattended.get('package_blacklist', {}) -%}
{% set auto_fix_interrupted_dpkg = unattended.get('auto_fix_interrupted_dpkg', 'true') -%}
{% set minimal_steps = unattended.get('minimal_steps', 'false') -%}
@@ -16,6 +17,11 @@ Unattended-Upgrade::Allowed-Origins {
"{{ pattern }}";
{%- endfor %}
};
Unattended-Upgrade::Origins-Pattern {
{%- for pattern in origins_patterns %}
"{{ pattern }}";
{%- endfor %}
};
Unattended-Upgrade::Package-Blacklist {
{%- for package in package_blacklist %}
"{{ package }}";

+ 4
- 0
pillar.example 查看文件

@@ -12,6 +12,10 @@ apt:
package_blacklist:
- package1
- package2
origins_patterns:
- origin=SaltStack
- origin=Debian,archive=stable,label=Debian-Security
- origin=Debian,archive=oldstable,label=Debian-Security
auto_fix_interrupted_dpkg: true
minimal_steps: false
install_on_shutdown: false

正在加载...
取消
保存