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.

31 lines
1.1KB

  1. {% set distribution = salt['grains.get']('lsb_distrib_codename') %}
  2. {% set distribution_updates = salt['grains.get']('lsb_distrib_codename') ~ '/updates' %}
  3. {% set arch = salt['grains.get']('osarch').split(' ') %}
  4. {% set apt = salt['grains.filter_by']({
  5. 'Debian': {
  6. 'pkgs': ['unattended-upgrades'],
  7. 'confd_dir': '/etc/apt/apt.conf.d',
  8. 'unattended_config': '50unattended-upgrades',
  9. 'periodic_config': '10periodic',
  10. 'sources_list_dir': '/etc/apt/sources.list.d',
  11. 'remove_sources_list': false,
  12. 'clean_sources_list_d': false,
  13. 'default_url': 'http://httpredir.debian.org/debian/',
  14. 'repositories': {
  15. 'sane_default': {
  16. 'distro': distribution,
  17. 'url': 'http://httpredir.debian.org/debian/',
  18. 'arch': arch,
  19. 'comps': ['main'],
  20. },
  21. 'security-stable': {
  22. 'distro': distribution_updates,
  23. 'url': 'http://security.debian.org/',
  24. 'arch': arch,
  25. 'comps': ['main'],
  26. },
  27. },
  28. },
  29. }, merge=salt['pillar.get']('apt:lookup'), default='Debian') %}