2021-04-07 21:53:30 +00:00
|
|
|
---
|
|
|
|
- name: Add mirror.crans.org in /etc/hosts
|
|
|
|
lineinfile:
|
|
|
|
state: present
|
|
|
|
path: /etc/hosts
|
|
|
|
regex: "^{{ item }}"
|
|
|
|
line: "{{ item }} mirror.crans.org charybde.crans.org mirror"
|
|
|
|
loop:
|
|
|
|
- "185.230.79.30"
|
|
|
|
- "2a0c:700:2:0:ea39:35ff:fef0:48c9"
|
|
|
|
|
|
|
|
- name: Configure Debian repositories
|
|
|
|
template:
|
|
|
|
src: apt/sources.list.j2
|
|
|
|
dest: /etc/apt/sources.list
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
|
2021-04-08 08:43:05 +00:00
|
|
|
- name: Configure extra repositories
|
2021-04-07 21:53:30 +00:00
|
|
|
template:
|
|
|
|
src: apt/sources.list.d/sources.list.j2
|
|
|
|
dest: "/etc/apt/sources.list.d/{{ item.name }}.list"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
loop: "{{ apt.extra_repositories }}"
|
2021-04-07 22:28:20 +00:00
|
|
|
|
|
|
|
- name: Configure pin from future distributions
|
|
|
|
template:
|
2021-04-08 08:43:05 +00:00
|
|
|
src: "apt/{{ item[0] }}.d/pin{{ item[1] }}.j2"
|
|
|
|
dest: "/etc/apt/{{ item[0] }}.d/{{ item[2].key }}{{ item[1] }}"
|
2021-04-07 22:28:20 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
with_nested:
|
2021-04-08 08:43:05 +00:00
|
|
|
- [["sources.list", ".list"], ["preferences", ""]]
|
2021-04-07 22:28:20 +00:00
|
|
|
- "{{ apt.pin|dict2items }}"
|
2021-04-07 22:46:07 +00:00
|
|
|
|
|
|
|
- name: Update APT cache
|
|
|
|
apt:
|
|
|
|
update_cache: true
|