init.sls 812 B

123456789101112131415161718192021222324252627
  1. #
  2. # Linux Kernel
  3. #
  4. {% set node_config = salt['pillar.get']('nodes:' ~ grains['id'], {}) %}
  5. {% set version_fallback = "amd64" %}
  6. {% set version_global = salt['pillar.get']('ffho:kernel_version', version_fallback) %}
  7. {% set version = node_config.get('kernel_version', version_global) %}
  8. linux-kernel:
  9. pkg.latest:
  10. - name: linux-image-{{ version }}
  11. {% if grains.oscodename in ['jessie'] %}
  12. - fromrepo: {{ grains.oscodename }}-backports
  13. {% endif %}
  14. {#
  15. # Install kernel headers if we might need to compile a batman_adv module on this node.
  16. #}
  17. {% if 'batman' in node_config.get('roles', []) and 'v14' in grains['id'] %}
  18. linux-headers:
  19. pkg.latest:
  20. - name: linux-headers-{{ version }}
  21. {% if grains.oscodename in ['jessie'] %}
  22. - fromrepo: {{ grains.oscodename }}-backports
  23. {% endif %}
  24. {% endif %}