Saltstack Official Linux 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.

73 lines
1.2KB

  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. {%- if system.kernel is defined %}
  4. Basic kernel:
  5. linux:
  6. system:
  7. kernel:
  8. hold: true
  9. versions:
  10. generic:
  11. headers: true
  12. linux:
  13. system:
  14. kernel:
  15. source:
  16. engine: pkg
  17. repo: from_repo
  18. version: 1.13.42
  19. hold: true
  20. headers: true
  21. generic: true
  22. linux-headers-3.13.0-34
  23. linux-image-3.13.0-34-generic
  24. linux-headers-3.13.0-34-generic
  25. {%- if system.kernel.get('source', {'engine': 'pkg'}).engine == 'pkg' %}
  26. {%- if system.kernel.version is defined %}
  27. linux_kernel_package:
  28. pkg.installed:
  29. - name: linux-image-{{ system.kernel.version }}
  30. - refresh: true
  31. {%- else %}
  32. linux_kernel_package:
  33. pkg.latest:
  34. - name: linux-image-generic
  35. - refresh: true
  36. {%- endif %}
  37. {%- if system.kernel.headers is defined %}
  38. {%- if system.kernel.version is defined %}
  39. linux_kernel_package:
  40. pkg.installed:
  41. - name: linux-image-{{ system.kernel.version }}
  42. - version:
  43. - refresh: true
  44. {%- else %}
  45. linux_kernel_package:
  46. pkg.latest:
  47. - name: linux-image-generic
  48. - refresh: true
  49. {%- endif %}
  50. {%- endif %}
  51. {%- endif %}
  52. {%- endif %}
  53. {%- endif %}