[apt] Configure APT sources
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
27
roles/apt/tasks/main.yml
Normal file
27
roles/apt/tasks/main.yml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
- 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 }}"
|
Reference in New Issue
Block a user