[apt] Pin some packages from other versions
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
7388125008
commit
4814d7d6ae
@ -2,3 +2,5 @@
|
||||
glob_apt:
|
||||
mirror: "http://mirror.crans.org/"
|
||||
extra_repositories: []
|
||||
pin:
|
||||
bullseye: []
|
||||
|
@ -25,3 +25,14 @@
|
||||
group: root
|
||||
mode: 0644
|
||||
loop: "{{ apt.extra_repositories }}"
|
||||
|
||||
- name: Configure pin from future distributions
|
||||
template:
|
||||
src: "apt/{{ item[0] }}.d/pin.list.j2"
|
||||
dest: "/etc/apt/{{ item[0] }}.d/{{ item[1].key }}.list"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_nested:
|
||||
- ["sources.list", "preferences"]
|
||||
- "{{ apt.pin|dict2items }}"
|
||||
|
12
roles/apt/templates/apt/preferences.d/pin.list.j2
Normal file
12
roles/apt/templates/apt/preferences.d/pin.list.j2
Normal file
@ -0,0 +1,12 @@
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
|
||||
Package: *
|
||||
Pin: release n={{ item[1].key }}
|
||||
Pin-Priority: 1
|
||||
{% for package in item[1].value -%}
|
||||
|
||||
Package: {{ package }}
|
||||
Pin: release n={{ item[1].key }}
|
||||
Pin-Priority: 900
|
||||
{% endfor -%}
|
3
roles/apt/templates/apt/sources.list.d/pin.list.j2
Normal file
3
roles/apt/templates/apt/sources.list.d/pin.list.j2
Normal file
@ -0,0 +1,3 @@
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
deb {{ apt.mirror }}debian {{ item[1].key }} main contrib non-free
|
Loading…
Reference in New Issue
Block a user