-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
Why have update and upgrade only run when sources.list or sources.list.d are changed?
This means it can't be run as a maintenance job. I'm new to Saltstack formulas, so am I missing something obvious?
I modified and tested the formula to use additional pillar data, "always_update" and "always_upgrade" to enable the maintenance behavior, e.g.
{% from "apt/map.jinja" import apt as apt_map with context %}
{% set apt = pillar.get('apt', {}) %}
{% set always_update = apt.get('always_update', apt_map.always_update) %}
apt-get -y update:
{% if always_update %}
cmd.run
{% else %}
cmd.wait:
- watch:
- file: /etc/apt/sources.list
- file: /etc/apt/sources.list.d
{% endif %}
Any interesting in a pull request?
xenadmin
Metadata
Metadata
Assignees
Labels
No labels