fix: Manage preference
This commit is contained in:
parent
028beb4ea0
commit
a8178194c3
@ -19,13 +19,6 @@ apt_repositories: []
|
|||||||
# key_url: https://pkgs.zabbly.com/key.asc
|
# key_url: https://pkgs.zabbly.com/key.asc
|
||||||
# key_path: /etc/apt/keyrings/incus.asc
|
# key_path: /etc/apt/keyrings/incus.asc
|
||||||
|
|
||||||
apt_preferences: []
|
|
||||||
# Exemple:
|
|
||||||
# - filename: sid
|
|
||||||
# package: "*"
|
|
||||||
# pin: release n=sid
|
|
||||||
# priority: 100
|
|
||||||
|
|
||||||
apt_remove: []
|
apt_remove: []
|
||||||
apt_install: []
|
apt_install: []
|
||||||
|
|
||||||
|
@ -32,13 +32,9 @@
|
|||||||
- name: Ajouter le fichier de priorité
|
- name: Ajouter le fichier de priorité
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: preferences.j2
|
src: preferences.j2
|
||||||
dest: /etc/apt/preferences.d/{{ item.priority }}-{{ item.name }}
|
dest: /etc/apt/preferences.d/40-debian
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
when: apt_preferences | length > 0
|
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ apt_preferences }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.name }}"
|
|
||||||
notify: Mettre à jour le cache
|
notify: Mettre à jour le cache
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
APT::Default-Release "stable";
|
|
||||||
APT::Install-Recommends "false";
|
APT::Install-Recommends "false";
|
||||||
APT::Install-Suggests "false";
|
APT::Install-Suggests "false";
|
||||||
APT::Get::Show-Versions "true";
|
APT::Get::Show-Versions "true";
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
Package: {{ item.package }}
|
Package: *
|
||||||
Pin: {{ item.pin }}
|
Pin: release a=testing
|
||||||
Pin-Priority: {{ item.priority }}
|
Pin-Priority: -10
|
||||||
|
|
||||||
|
Package: *
|
||||||
|
Pin: release a=unstable
|
||||||
|
Pin-Priority: -20
|
||||||
|
Loading…
Reference in New Issue
Block a user