feat: Use deb822 format for sources
This commit is contained in:
parent
7b5b672e41
commit
c825925d7c
@ -2,7 +2,7 @@
|
|||||||
# defaults file for apt
|
# defaults file for apt
|
||||||
|
|
||||||
apt_distribution_name: debian
|
apt_distribution_name: debian
|
||||||
apt_distribution_release: bullseye
|
apt_distribution_release: bookworm
|
||||||
apt_distribution_sections: main
|
apt_distribution_sections: main
|
||||||
|
|
||||||
apt_repositories: []
|
apt_repositories: []
|
||||||
|
@ -11,10 +11,23 @@
|
|||||||
become: true
|
become: true
|
||||||
notify: Mettre à jour le cache
|
notify: Mettre à jour le cache
|
||||||
|
|
||||||
|
- name: Nettoyer le fichier de base
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/apt/sources.list
|
||||||
|
state: absent
|
||||||
|
become: true
|
||||||
|
notify: Mettre à jour le cache
|
||||||
|
|
||||||
|
- name: Supprimer le mirroirs
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/apt/mirrors
|
||||||
|
state: absent
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Déployer la configuration des sources
|
- name: Déployer la configuration des sources
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ apt_distribution_name }}-{{ apt_distribution_release }}.list.j2"
|
src: debian.sources.list.j2
|
||||||
dest: /etc/apt/sources.list
|
dest: /etc/apt/sources.list.d/debian.sources
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
# {{ ansible_managed }}
|
|
||||||
|
|
||||||
deb http://deb.debian.org/debian {{ apt_distribution_release }} {{ apt_distribution_sections }}
|
|
||||||
deb http://security.debian.org/debian-security {{ apt_distribution_release }}-security {{ apt_distribution_sections }}
|
|
||||||
deb http://deb.debian.org/debian {{ apt_distribution_release }}-updates {{ apt_distribution_sections }}
|
|
||||||
deb https://deb.debian.org/debian/ {{ apt_distribution_release }}-backports {{ apt_distribution_sections }}
|
|
@ -1,6 +0,0 @@
|
|||||||
# {{ ansible_managed }}
|
|
||||||
|
|
||||||
deb http://deb.debian.org/debian {{ apt_distribution_release }} {{ apt_distribution_sections }}
|
|
||||||
deb http://security.debian.org/debian-security {{ apt_distribution_release }}-security {{ apt_distribution_sections }}
|
|
||||||
deb http://deb.debian.org/debian {{ apt_distribution_release }}-updates {{ apt_distribution_sections }}
|
|
||||||
deb https://deb.debian.org/debian/ {{ apt_distribution_release }}-backports {{ apt_distribution_sections }}
|
|
@ -1,3 +0,0 @@
|
|||||||
# {{ ansible_managed }}
|
|
||||||
|
|
||||||
deb http://deb.debian.org/debian {{ apt_distribution_release }} {{ apt_distribution_sections }}
|
|
21
templates/debian.sources.list.j2
Normal file
21
templates/debian.sources.list.j2
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
{% if apt_distribution_release == "sid" %}
|
||||||
|
Types: deb
|
||||||
|
URIs: https://deb.debian.org/debian
|
||||||
|
Suites: {{ apt_distribution_release }} {{ apt_distribution_release }}-updates {{ apt_distribution_release }}-backports
|
||||||
|
Components: {{ apt_distribution_sections }}
|
||||||
|
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||||
|
{% else %}
|
||||||
|
Types: deb
|
||||||
|
URIs: https://deb.debian.org/debian
|
||||||
|
Suites: {{ apt_distribution_release }} {{ apt_distribution_release }}-updates {{ apt_distribution_release }}-backports
|
||||||
|
Components: {{ apt_distribution_sections }}
|
||||||
|
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||||
|
|
||||||
|
Types: deb
|
||||||
|
URIs: http://security.debian.org/debian-security
|
||||||
|
Suites: {{ apt_distribution_release }}-security
|
||||||
|
Components: {{ apt_distribution_sections }}
|
||||||
|
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue
Block a user