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

{% set apt = pillar.get('apt', {}) -%} {% set apt = pillar.get('apt', {}) -%}
{% set unattended = apt.get('unattended', {}) -%} {% set unattended = apt.get('unattended', {}) -%}
{% set allowed_origins = unattended.get('allowed_origins', ['${distro_id}:${distro_codename}-security']) -%} {% 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 package_blacklist = unattended.get('package_blacklist', {}) -%}
{% set auto_fix_interrupted_dpkg = unattended.get('auto_fix_interrupted_dpkg', 'true') -%} {% set auto_fix_interrupted_dpkg = unattended.get('auto_fix_interrupted_dpkg', 'true') -%}
{% set minimal_steps = unattended.get('minimal_steps', 'false') -%} {% set minimal_steps = unattended.get('minimal_steps', 'false') -%}
"{{ pattern }}"; "{{ pattern }}";
{%- endfor %} {%- endfor %}
}; };
Unattended-Upgrade::Origins-Pattern {
{%- for pattern in origins_patterns %}
"{{ pattern }}";
{%- endfor %}
}
Unattended-Upgrade::Package-Blacklist { Unattended-Upgrade::Package-Blacklist {
{%- for package in package_blacklist %} {%- for package in package_blacklist %}
"{{ package }}"; "{{ package }}";

+ 4
- 0
pillar.example View File

package_blacklist: package_blacklist:
- package1 - package1
- package2 - package2
origins_patterns:
- origin=SaltStack
- origin=Debian,archive=stable,label=Debian-Security
- origin=Debian,archive=oldstable,label=Debian-Security
auto_fix_interrupted_dpkg: true auto_fix_interrupted_dpkg: true
minimal_steps: false minimal_steps: false
install_on_shutdown: false install_on_shutdown: false

Loading…
Cancel
Save