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.

47 lines
1.7KB

  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. 'remove_apt_conf': false,
  18. 'clean_apt_conf_d': false,
  19. 'apt_conf_d': {},
  20. 'default_keyserver': 'pool.sks-keyservers.net',
  21. 'default_url': 'http://deb.debian.org/debian/',
  22. 'default_keyring_package': 'debian-archive-keyring',
  23. 'repositories': {
  24. 'sane_default': {
  25. 'distro': distribution,
  26. 'url': 'http://deb.debian.org/debian/',
  27. 'arch': arch,
  28. 'comps': ['main'],
  29. },
  30. 'security-stable': {
  31. 'distro': distribution_updates,
  32. 'url': 'http://security.debian.org/',
  33. 'arch': arch,
  34. 'comps': ['main'],
  35. },
  36. },
  37. },
  38. }, merge=salt['grains.filter_by']({
  39. }, grain='oscodename', merge=salt['grains.filter_by']({
  40. 'Ubuntu': {
  41. 'keyring_package': 'ubuntu-keyring'
  42. },
  43. 'Mint': {
  44. 'keyring_package': 'linuxmint-keyring'
  45. },
  46. }, merge=salt['pillar.get']('apt:lookup'), default='Debian'))) %}