Saltstack Official Apt Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

29 lines
941B

  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 }}