Browse Source

Update unattended.sls

master
Ben McClure 9 years ago
parent
commit
4db2ca91f4
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      apt/unattended.sls

+ 4
- 4
apt/unattended.sls View File

# This is the main state file for configuring unattended upgrades with apt # This is the main state file for configuring unattended upgrades with apt


{% from "apt/map.jinja" import map with context %}
{% from "apt/map.jinja" import apt with context %}


apt_unattended_pakgs:: apt_unattended_pakgs::
pkg.installed: pkg.installed:
- pkgs: - pkgs:
{% for pkg in map.pkgs %}
{% for pkg in apt.pkgs %}
- {{ pkg }} - {{ pkg }}
{% endfor %} {% endfor %}


{% set automatic_reboot = salt['pillar.get']('apt:unattended:automatic_reboot', 'false') %} {% set automatic_reboot = salt['pillar.get']('apt:unattended:automatic_reboot', 'false') %}
{% set dl_limit = salt['pillar.get']('apt:unattended:dl_limit', '0') %} {% set dl_limit = salt['pillar.get']('apt:unattended:dl_limit', '0') %}


{{ map.confd_dir }}/{{ map.unattended_config }}:
{{ apt.confd_dir }}/{{ apt.unattended_config }}:
file.managed: file.managed:
- contents: | - contents: |
Unattended-Upgrade::Origins-Pattern { Unattended-Upgrade::Origins-Pattern {
{% set auto_clean_interval = salt['pillar.get']('apt:unattended:auto_clean_interval', '7') %} {% set auto_clean_interval = salt['pillar.get']('apt:unattended:auto_clean_interval', '7') %}
{% set verbose = salt['pillar.get']('apt:unattended:verbose', '2') %} {% set verbose = salt['pillar.get']('apt:unattended:verbose', '2') %}


{{ map.confd_dir }}/{{ map.periodic_config }}:
{{ apt.confd_dir }}/{{ apt.periodic_config }}:
file.managed: file.managed:
- contents: | - contents: |
APT::Periodic::Enable "{{ enabled }}"; APT::Periodic::Enable "{{ enabled }}";

Loading…
Cancel
Save