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
|
|
|
|
|
|
|
|
- name: Connfigure extra repositories
|
|
|
|
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:
|
|
|
|
src: "apt/{{ item[0] }}.d/pin.list.j2"
|
|
|
|
dest: "/etc/apt/{{ item[0] }}.d/{{ item[1].key }}.list"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
with_nested:
|
|
|
|
- ["sources.list", "preferences"]
|
|
|
|
- "{{ apt.pin|dict2items }}"
|
2021-04-07 22:46:07 +00:00
|
|
|
|
|
|
|
- name: Update APT cache
|
|
|
|
apt:
|
|
|
|
update_cache: true
|