apt: with Debian, 12 backports are installed but disabled by default
This commit is contained in:
parent
512b06a513
commit
6f61a0744c
|
@ -15,6 +15,8 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
|||
|
||||
### Changed
|
||||
|
||||
* apt: with Debian 12, backports are installed but disabled by default
|
||||
|
||||
### Fixed
|
||||
|
||||
### Removed
|
||||
|
|
|
@ -8,6 +8,8 @@ apt_upgrade: False
|
|||
apt_install_basics: True
|
||||
apt_basics_components: "main"
|
||||
|
||||
# With Debian 12+ and the deb822 format of source files
|
||||
# backports are always installed but enabled according to `apt_install_backports`
|
||||
apt_install_backports: False
|
||||
apt_backports_components: "main"
|
||||
|
||||
|
|
3
apt/files/bookworm_backports_preferences
Normal file
3
apt/files/bookworm_backports_preferences
Normal file
|
@ -0,0 +1,3 @@
|
|||
Package: *
|
||||
Pin: release a=bookworm-backports
|
||||
Pin-Priority: 50
|
|
@ -1,13 +1,6 @@
|
|||
---
|
||||
- name: No backports config in default sources.list
|
||||
lineinfile:
|
||||
dest: /etc/apt/sources.list.d/
|
||||
regexp: "backports"
|
||||
state: absent
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Backports sources list is installed
|
||||
- name: Backports deb822 sources list is installed
|
||||
template:
|
||||
src: '{{ ansible_distribution_release }}_backports.sources.j2'
|
||||
dest: /etc/apt/sources.list.d/backports.sources
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
- apt_install_basics | bool
|
||||
- ansible_distribution_major_version is version('12', '>=')
|
||||
|
||||
|
||||
- name: Install backports repositories (Debian <12)
|
||||
import_tasks: backports.oneline.yml
|
||||
tags:
|
||||
|
@ -55,12 +54,13 @@
|
|||
- apt_install_backports | bool
|
||||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
# With Debian 12+ and the deb822 format of source files
|
||||
# backports are always installed but enabled according to `apt_install_backports`
|
||||
- name: Install backports repositories (Debian >=12)
|
||||
import_tasks: backports.deb822.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
- apt_install_backports | bool
|
||||
- ansible_distribution_major_version is version('12', '>=')
|
||||
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ Types: deb
|
|||
URIs: http://mirror.evolix.org/debian
|
||||
Suites: bullseye-backports
|
||||
Components: {{ apt_backports_components | mandatory }}
|
||||
Enabled: yes
|
||||
Enabled: {{ apt_install_backports | bool | ternary('yes', 'no') }}
|
||||
|
|
Loading…
Reference in a new issue