# This is the main state file for configuring apt-listchanges | |||||
{% from "apt/map.jinja" import apt as apt_map with context %} | |||||
{% set apt = pillar.get('apt:listchanges', {}) -%} | |||||
{% set listchanges_config_template = apt.get('listchanges_config_template', 'salt://apt/templates/listchanges_config.jinja') -%} | |||||
apt_listchanges_pkgs: | |||||
pkg.installed: | |||||
- name: apt-listchanges | |||||
/etc/apt/listchanges.conf: | |||||
file.managed: | |||||
- template: jinja | |||||
- user: root | |||||
- group: root | |||||
- mode: 644 | |||||
- source: {{ listchanges_config_template }} |
{% set apt = pillar.get('apt', {}) -%} | |||||
{% set unattended = apt.get('listchanges', {}) -%} | |||||
{%- for profile_name, profile_details in listchanges.get('profiles', {}).items() %} | |||||
{%- set frontend = profile_details.get('frontend', None) %} | |||||
{%- set email_address = profile_details.get('email_address', None) %} | |||||
{%- set confirm = profile_details.get('confirm', None) %} | |||||
{%- set save_seen = profile_details.get('save_seen', None) %} | |||||
{%- set which = profile_details.get('which', None) %} | |||||
{%- set browser = profile_details.get('browser', None %} | |||||
[{{ profile_name }}] | |||||
{%- if frontend != None %} | |||||
frontend={{ frontend }} | |||||
{%- endif %} | |||||
{%- if email_address != None %} | |||||
email_address={{ email_address }} | |||||
{%- endif %} | |||||
{%- if confirm != None %} | |||||
confirm={{ confirm }} | |||||
{%- endif %} | |||||
{%- if save_seen != None %} | |||||
save_seen={{ save_seen }} | |||||
{%- endif %} | |||||
{%- if which != None %} | |||||
which={{ which }} | |||||
{%- endif %} | |||||
{%- if browser != None %} | |||||
browser={{ browser }} | |||||
{%- endif %} | |||||
{%- endfor %} |
{% set unattended_config_template = apt.get('unattended_config_template', 'salt://apt/templates/unattended_config.jinja') -%} | {% set unattended_config_template = apt.get('unattended_config_template', 'salt://apt/templates/unattended_config.jinja') -%} | ||||
{% set periodic_config_template = apt.get('periodic_config_template', 'salt://apt/templates/periodic_config.jinja') -%} | {% set periodic_config_template = apt.get('periodic_config_template', 'salt://apt/templates/periodic_config.jinja') -%} | ||||
apt_unattended_pakgs:: | |||||
apt_unattended_pkgs: | |||||
pkg.installed: | pkg.installed: | ||||
- pkgs: | - pkgs: | ||||
{% for pkg in apt_map.pkgs %} | {% for pkg in apt_map.pkgs %} |
auto_clean_interval: 7 | auto_clean_interval: 7 | ||||
verbose: 2 | verbose: 2 | ||||
listchanges: | |||||
profiles: | |||||
cmdline: | |||||
frontend: pager | |||||
apt: | |||||
frontend: pager | |||||
email_address: root | |||||
confirm: 1 | |||||
custom: | |||||
frontend: browser | |||||
browser: mozilla | |||||
repositories: | repositories: | ||||
security-stable: | security-stable: | ||||
distro: stable/updates | distro: stable/updates |