apt-cacher/server/tasks/main.yaml
changeset 187 0f3a64c60ec5
parent 144 267d58c0e186
child 238 bdbc88cb5078
--- a/apt-cacher/server/tasks/main.yaml	Mon Sep 05 11:14:48 2022 -0500
+++ b/apt-cacher/server/tasks/main.yaml	Mon Sep 05 16:02:56 2022 -0500
@@ -3,6 +3,7 @@
 - name: install apt packages
   become: yes
   apt: name="apt-cacher-ng"
+  notify: restart apt-cacher-ng
 
 - name: configure apt-cacher dirs
   become: yes
@@ -15,3 +16,16 @@
     - { key: "CacheDir", val: "{{apt_cacher_cache_dir}}" }
     - { key: "LogDir", val: "{{apt_cacher_log_dir}}" }
     - { key: "Port", val: "{{apt_cacher_port}}" }
+  notify: restart apt-cacher-ng
+
+- name: make cache and log dirs
+  become: yes
+  file:
+    path: "{{item}}"
+    state: "directory"
+    owner: "apt-cacher-ng"
+    group: "apt-cacher-ng"
+  loop:
+    - "{{apt_cacher_cache_dir}}"
+    - "{{apt_cacher_log_dir}}"
+  notify: restart apt-cacher-ng