ansible/roles/apt_cacher_ng/tasks/main.yml

31 lines
704 B
YAML
Raw Permalink Normal View History

2021-04-07 23:59:59 +02:00
---
- name: Install apt-cacher-ng
apt:
name: apt-cacher-ng
2021-04-08 00:18:13 +02:00
state: present
2021-04-07 23:59:59 +02:00
register: apt_result
retries: 3
2021-04-08 00:18:13 +02:00
until: apt_result is succeeded
2021-04-07 23:59:59 +02:00
- name: Deploy configuration for apt-cacher-ng
template:
src: apt-cacher-ng/acng.conf.j2
dest: /etc/apt-cacher-ng/acng.conf
- name: Setup https for debian repository
template:
src: apt-cacher-ng/backends_debian.j2
dest: /etc/apt-cacher-ng/backends_debian
- name: Removes other distribution
file:
2021-04-08 00:18:13 +02:00
path: "/etc/apt-cacher-ng/{{ item }}"
state: absent
2021-04-07 23:59:59 +02:00
loop:
- backends_ubuntu.default
- backends_ubuntu
- backends_kali.default
- backends_gentoo.default
- backends_debvol
- backends_debian.default