Saltstack Official Apt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unattended.sls 941B

12345678910111213141516171819202122232425262728
  1. # This is the main state file for configuring unattended upgrades with apt
  2. {% from "apt/map.jinja" import apt as apt_map with context %}
  3. {% set apt = pillar.get('apt:unattended', {}) -%}
  4. {% set unattended_config_template = apt.get('unattended_config_template', 'salt://apt/templates/unattended_config.jinja') -%}
  5. {% set periodic_config_template = apt.get('periodic_config_template', 'salt://apt/templates/periodic_config.jinja') -%}
  6. apt_unattended_pkgs:
  7. pkg.installed:
  8. - pkgs:
  9. {% for pkg in apt_map.pkgs %}
  10. - {{ pkg }}
  11. {% endfor %}
  12. {{ apt_map.confd_dir }}/{{ apt_map.unattended_config }}:
  13. file.managed:
  14. - template: jinja
  15. - user: root
  16. - group: root
  17. - mode: 644
  18. - source: {{ unattended_config_template }}
  19. {{ apt_map.confd_dir }}/{{ apt_map.periodic_config }}:
  20. file.managed:
  21. - template: jinja
  22. - user: root
  23. - group: root
  24. - mode: 644
  25. - source: {{ periodic_config_template }}