aboutsummaryrefslogtreecommitdiff
path: root/roles/apt_cacher/tasks
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-28 22:49:37 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-28 22:49:37 +0200
commitd507342f825d6d35bddeeb7d993bc1a54afb10f4 (patch)
tree410d367d3aa44adb9999d31325f4aadd40e70f8e /roles/apt_cacher/tasks
parent77b42f82b26299a525052c5dcebcbaaef3cf1d50 (diff)
downloadansible_collection-d507342f825d6d35bddeeb7d993bc1a54afb10f4.tar.gz
add apt_cacher
Diffstat (limited to 'roles/apt_cacher/tasks')
-rw-r--r--roles/apt_cacher/tasks/main.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/apt_cacher/tasks/main.yml b/roles/apt_cacher/tasks/main.yml
new file mode 100644
index 0000000..84556ca
--- /dev/null
+++ b/roles/apt_cacher/tasks/main.yml
@@ -0,0 +1,20 @@
+---
+- name: Install package
+ apt:
+ name: apt-cacher-ng
+ become: yes
+
+- name: Ensure write access
+ file:
+ path: '{{ apt_cacher.dir }}'
+ owner: apt-cacher-ng
+ group: apt-cacher-ng
+ state: directory
+ become: yes
+
+- name: Install config
+ template:
+ src: acng.conf.j2
+ dest: /etc/apt-cacher-ng/acng.conf
+ become: yes
+ notify: restart