--- - name: Backports deb822 sources list is installed template: src: '{{ ansible_distribution_release }}_backports.sources.j2' dest: /etc/apt/sources.list.d/backports.sources force: yes mode: "0640" register: apt_backports_sources tags: - apt - name: Backports configuration copy: src: '{{ ansible_distribution_release }}_backports_preferences' dest: /etc/apt/preferences.d/0-backports-defaults force: yes mode: "0640" register: apt_backports_config tags: - apt - name: Apt update apt: update_cache: yes when: apt_backports_sources is changed or apt_backports_config is changed tags: - apt