Browse Source

adding support for Origins-Pattern in unattended upgrade

tags/v0.7.0
carpenti 7 years ago
parent
commit
1fd1ab184c
2 changed files with 10 additions and 0 deletions
  1. +6
    -0
      apt/templates/unattended_config.jinja
  2. +4
    -0
      pillar.example

+ 6
- 0
apt/templates/unattended_config.jinja View File

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

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

Loading…
Cancel
Save