bullseye-security exists
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
a1683dbf19
commit
4fe3babc83
@ -2,3 +2,6 @@
|
|||||||
interfaces:
|
interfaces:
|
||||||
adm: eth0
|
adm: eth0
|
||||||
srv_nat: eth1
|
srv_nat: eth1
|
||||||
|
|
||||||
|
loc_apt:
|
||||||
|
backports: true
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
- "185.230.79.30"
|
- "185.230.79.30"
|
||||||
- "2a0c:700:2:0:ea39:35ff:fef0:48c9"
|
- "2a0c:700:2:0:ea39:35ff:fef0:48c9"
|
||||||
|
|
||||||
- name: Add mirror.crans.org in /etc/hosts
|
- name: Add mirror.adm.ynerant.fr in /etc/hosts
|
||||||
lineinfile:
|
lineinfile:
|
||||||
state: present
|
state: present
|
||||||
path: /etc/hosts
|
path: /etc/hosts
|
||||||
@ -36,6 +36,7 @@
|
|||||||
loop: "{{ apt.extra_repositories }}"
|
loop: "{{ apt.extra_repositories }}"
|
||||||
|
|
||||||
- name: Configure pin from future distributions
|
- name: Configure pin from future distributions
|
||||||
|
when: item[2].key != ansible_distribution_release
|
||||||
template:
|
template:
|
||||||
src: "apt/{{ item[0] }}.d/pin{{ item[1] }}.j2"
|
src: "apt/{{ item[0] }}.d/pin{{ item[1] }}.j2"
|
||||||
dest: "/etc/apt/{{ item[0] }}.d/{{ item[2].key }}{{ item[1] }}"
|
dest: "/etc/apt/{{ item[0] }}.d/{{ item[2].key }}{{ item[1] }}"
|
||||||
@ -46,6 +47,15 @@
|
|||||||
- [["sources.list", ".list"], ["preferences", ""]]
|
- [["sources.list", ".list"], ["preferences", ""]]
|
||||||
- "{{ apt.pin|dict2items }}"
|
- "{{ apt.pin|dict2items }}"
|
||||||
|
|
||||||
|
- name: Clear useless pinned configuration
|
||||||
|
when: item[2].key == ansible_distribution_release
|
||||||
|
file:
|
||||||
|
path: "/etc/apt/{{ item[0] }}.d/{{ item[2].key }}{{ item[1] }}"
|
||||||
|
state: absent
|
||||||
|
with_nested:
|
||||||
|
- [["sources.list", ".list"], ["preferences", ""]]
|
||||||
|
- "{{ apt.pin|dict2items }}"
|
||||||
|
|
||||||
- name: Update APT cache
|
- name: Update APT cache
|
||||||
apt:
|
apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{{ ansible_header | comment }}
|
{{ ansible_header | comment }}
|
||||||
|
|
||||||
{% if ansible_distribution_release != "bullseye" %}
|
|
||||||
{# Debian security does not exist yet for bullseye #}
|
|
||||||
# Mises à jour de sécurité
|
# Mises à jour de sécurité
|
||||||
|
{% if ansible_distribution_release == "bullseye" %}
|
||||||
|
deb {{ apt.mirror }}debian-security {{ ansible_distribution_release }}-security main contrib non-free
|
||||||
|
{% else %}
|
||||||
deb {{ apt.mirror }}debian-security {{ ansible_distribution_release }}/updates main contrib non-free
|
deb {{ apt.mirror }}debian-security {{ ansible_distribution_release }}/updates main contrib non-free
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user