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.

36 lines
1.3KB

  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. 'preferences_dir': '/etc/apt/preferences.d',
  14. 'preferences': {},
  15. 'remove_preferences': false,
  16. 'clean_preferences_d': false,
  17. 'default_keyserver': 'pool.sks-keyservers.net',
  18. 'default_url': 'http://httpredir.debian.org/debian/',
  19. 'repositories': {
  20. 'sane_default': {
  21. 'distro': distribution,
  22. 'url': 'http://httpredir.debian.org/debian/',
  23. 'arch': arch,
  24. 'comps': ['main'],
  25. },
  26. 'security-stable': {
  27. 'distro': distribution_updates,
  28. 'url': 'http://security.debian.org/',
  29. 'arch': arch,
  30. 'comps': ['main'],
  31. },
  32. },
  33. },
  34. }, merge=salt['pillar.get']('apt:lookup'), default='Debian') %}