- name: add backports repo apt_repository: repo: "{{ item }}" state: present with_items: - "deb http://archive.debian.org/debian {{ ansible_distribution_release }}-backports main" when: ansible_distribution == "Debian" register: apt - name: update apt cache apt: update_cache: yes when: apt.changed - name: install backports-kernel apt: name: "{{item}}" default_release: jessie-backports state: latest when: ansible_distribution == "Debian" with_items: - linux-headers-amd64 - linux-image-amd64 notify: - Neustarten - Neustart abwarten