2017-01-10 10:18:42 +01:00
|
|
|
---
|
2017-06-07 09:53:42 +02:00
|
|
|
- name: No backports config in default sources.list
|
2017-05-05 10:16:09 +02:00
|
|
|
lineinfile:
|
2023-03-17 20:05:42 +01:00
|
|
|
dest: /etc/apt/sources.list.d/
|
2017-05-05 10:16:09 +02:00
|
|
|
regexp: "backports"
|
|
|
|
state: absent
|
2017-06-13 12:02:49 +02:00
|
|
|
tags:
|
2019-06-21 10:18:54 +02:00
|
|
|
- apt
|
2017-01-10 10:18:42 +01:00
|
|
|
|
|
|
|
- name: Backports sources list is installed
|
|
|
|
template:
|
2023-03-17 20:05:42 +01:00
|
|
|
src: '{{ ansible_distribution_release }}_backports.sources.j2'
|
|
|
|
dest: /etc/apt/sources.list.d/backports.sources
|
2017-01-10 10:18:42 +01:00
|
|
|
force: yes
|
2017-03-23 16:59:43 +01:00
|
|
|
mode: "0640"
|
2023-03-17 20:05:42 +01:00
|
|
|
register: apt_backports_sources
|
2017-06-13 12:02:49 +02:00
|
|
|
tags:
|
2019-06-21 10:18:54 +02:00
|
|
|
- apt
|
2017-01-10 10:18:42 +01:00
|
|
|
|
|
|
|
- name: Backports configuration
|
|
|
|
copy:
|
2017-03-13 16:47:53 +01:00
|
|
|
src: '{{ ansible_distribution_release }}_backports_preferences'
|
2017-03-24 14:05:29 +01:00
|
|
|
dest: /etc/apt/preferences.d/0-backports-defaults
|
2017-01-10 10:18:42 +01:00
|
|
|
force: yes
|
2017-03-23 16:59:43 +01:00
|
|
|
mode: "0640"
|
2017-10-31 15:50:25 +01:00
|
|
|
register: apt_backports_config
|
2017-06-13 12:02:49 +02:00
|
|
|
tags:
|
2019-06-21 10:18:54 +02:00
|
|
|
- apt
|
2017-05-23 15:23:08 +02:00
|
|
|
|
2017-10-31 15:50:25 +01:00
|
|
|
- name: Apt update
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
2023-03-17 20:05:42 +01:00
|
|
|
when: apt_backports_sources is changed or apt_backports_config is changed
|
2017-06-13 12:02:49 +02:00
|
|
|
tags:
|
2019-06-21 10:18:54 +02:00
|
|
|
- apt
|