feat: Use deb822 format for sources

This commit is contained in:
pulsar89.5 2024-05-24 12:44:01 +02:00
parent 7b5b672e41
commit c825925d7c
6 changed files with 37 additions and 18 deletions

View File

@ -2,7 +2,7 @@
# defaults file for apt
apt_distribution_name: debian
apt_distribution_release: bullseye
apt_distribution_release: bookworm
apt_distribution_sections: main
apt_repositories: []

View File

@ -11,10 +11,23 @@
become: true
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
ansible.builtin.template:
src: "{{ apt_distribution_name }}-{{ apt_distribution_release }}.list.j2"
dest: /etc/apt/sources.list
src: debian.sources.list.j2
dest: /etc/apt/sources.list.d/debian.sources
owner: root
group: root
mode: u=rw,g=r,o=r

View File

@ -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 }}

View File

@ -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 }}

View File

@ -1,3 +0,0 @@
# {{ ansible_managed }}
deb http://deb.debian.org/debian {{ apt_distribution_release }} {{ apt_distribution_sections }}

View 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 %}