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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {% set distribution = salt['grains.get']('lsb_distrib_codename') %}
  2. {% set arch = salt['grains.get']('osarch').split(' ') %}
  3. {% set apt = salt['grains.filter_by']({
  4. 'Debian': {
  5. 'pkgs': ['unattended-upgrades'],
  6. 'confd_dir': '/etc/apt/apt.conf.d',
  7. 'unattended_config': '50unattended-upgrades',
  8. 'periodic_config': '10periodic',
  9. 'sources_list_dir': '/etc/apt/sources.list.d',
  10. 'remove_sources_list': false,
  11. 'clean_sources_list_d': false,
  12. 'preferences_dir': '/etc/apt/preferences.d',
  13. 'preferences': {},
  14. 'remove_preferences': false,
  15. 'clean_preferences_d': false,
  16. 'remove_apt_conf': false,
  17. 'clean_apt_conf_d': false,
  18. 'apt_conf_d': {},
  19. 'default_keyserver': 'pool.sks-keyservers.net',
  20. 'default_url': 'http://deb.debian.org/debian/',
  21. 'default_keyring_package': 'debian-archive-keyring',
  22. 'repositories': {
  23. 'sane_default': {
  24. 'distro': distribution,
  25. 'url': 'http://deb.debian.org/debian/',
  26. 'arch': arch,
  27. 'comps': ['main'],
  28. },
  29. 'security-stable': {
  30. 'distro': distribution ~ '/updates',
  31. 'url': 'http://security.debian.org/',
  32. 'arch': arch,
  33. 'comps': ['main'],
  34. },
  35. 'default-updates': {
  36. 'distro': distribution ~ '-updates',
  37. 'url': 'http://deb.debian.org/debian/',
  38. 'arch': arch,
  39. 'comps': ['main'],
  40. },
  41. },
  42. },
  43. 'Ubuntu': {
  44. 'pkgs': ['unattended-upgrades'],
  45. 'confd_dir': '/etc/apt/apt.conf.d',
  46. 'unattended_config': '50unattended-upgrades',
  47. 'periodic_config': '10periodic',
  48. 'sources_list_dir': '/etc/apt/sources.list.d',
  49. 'remove_sources_list': false,
  50. 'clean_sources_list_d': false,
  51. 'preferences_dir': '/etc/apt/preferences.d',
  52. 'preferences': {},
  53. 'remove_preferences': false,
  54. 'clean_preferences_d': false,
  55. 'remove_apt_conf': false,
  56. 'clean_apt_conf_d': false,
  57. 'apt_conf_d': {},
  58. 'default_keyserver': 'keyserver.ubuntu.com',
  59. 'default_url': 'http://archive.ubuntu.com/ubuntu/',
  60. 'default_keyring_package': 'ubuntu-keyring',
  61. 'repositories': {
  62. 'default': {
  63. 'distro': distribution,
  64. 'url': 'http://archive.ubuntu.com/ubuntu/',
  65. 'arch': arch,
  66. 'comps': ['main'],
  67. },
  68. 'default-security': {
  69. 'distro': distribution ~ '-security',
  70. 'url': 'http://security.ubuntu.com/ubuntu/',
  71. 'arch': arch,
  72. 'comps': ['main'],
  73. },
  74. 'default-updates': {
  75. 'distro': distribution ~ '-updates',
  76. 'url': 'http://archive.ubuntu.com/ubuntu/',
  77. 'arch': arch,
  78. 'comps': ['main'],
  79. },
  80. },
  81. },
  82. }, grain='os', merge=salt['grains.filter_by']({
  83. 'Mint': {
  84. 'keyring_package': 'linuxmint-keyring'
  85. },
  86. }, grain='oscodename', merge=salt['pillar.get']('apt:lookup'), default='Debian')) %}