main.yml 605 B

123456789101112131415161718192021222324252627
  1. - name: add backports repo
  2. apt_repository:
  3. repo: "{{ item }}"
  4. state: present
  5. with_items:
  6. - "deb http://archive.debian.org/debian {{ ansible_distribution_release }}-backports main"
  7. when: ansible_distribution == "Debian"
  8. register: apt
  9. - name: update apt cache
  10. apt:
  11. update_cache: yes
  12. when: apt.changed
  13. - name: install backports-kernel
  14. apt:
  15. name: "{{item}}"
  16. default_release: jessie-backports
  17. state: latest
  18. when: ansible_distribution == "Debian"
  19. with_items:
  20. - linux-headers-amd64
  21. - linux-image-amd64
  22. notify:
  23. - Neustarten
  24. - Neustart abwarten