init.sls 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # APT
  3. #
  4. /etc/apt/sources.list:
  5. file.managed:
  6. - source: salt://apt/sources.list.{{ grains.os }}.{{ grains.oscodename }}
  7. /etc/cron.d/apt:
  8. file.managed:
  9. - source: salt://apt/update_apt.cron
  10. apt-transport-https:
  11. pkg.installed
  12. python-apt:
  13. pkg.installed
  14. ffho-repo:
  15. pkgrepo.managed:
  16. - comments:
  17. - "# FFHO APT repo"
  18. - human_name: FFHO repository
  19. - name: deb http://apt.ffho.net/ {{ grains.oscodename }} main contrib non-free
  20. - clean_file: True
  21. - dist: {{ grains.oscodename }}
  22. - file: /etc/apt/sources.list.d/ffho.list
  23. - keyserver: keys.gnupg.net
  24. {% if grains.oscodename == "jessie" %}
  25. - keyid: 40FC1CE2
  26. {% else %}
  27. - keyid: EB88A4D5
  28. {% endif %}
  29. - require:
  30. - pkg: python-apt
  31. # Purge old stuff
  32. /etc/apt/sources.list.d/freifunk.list:
  33. file.absent
  34. /etc/apt/sources.list.d/universe-factory.list:
  35. file.absent
  36. /etc/apt/sources.list.d/icinga2.list:
  37. file.absent
  38. {% if grains.manufacturer == "HP" %}
  39. apt-hpe:
  40. pkgrepo.managed:
  41. - comments:
  42. - "# HPE repo"
  43. - human_name: HPE repo
  44. - name: deb http://downloads.linux.hpe.com/SDR/repo/mcp {{ grains.oscodename }}/current non-free
  45. - file: /etc/apt/sources.list.d/hpe.list
  46. {% endif %}
  47. # APT preferences
  48. /etc/apt/preferences.d/ffho:
  49. file.managed:
  50. - source: salt://apt/ffho.preferences
  51. /etc/apt/apt.conf.d/ffho:
  52. file.managed:
  53. - source: salt://apt/ffho.apt.conf