Check for server conf for apt cacher proxy.
authorLuke Hoersten <luke@hoersten.org>
Sun, 09 Feb 2020 13:17:16 -0600
changeset 4 46fe3aa0080c
parent 3 0dc5400538ef
child 5 4f014cdac0b1
Check for server conf for apt cacher proxy.
apt-cacher/client/tasks/main.yaml
--- a/apt-cacher/client/tasks/main.yaml	Sun Feb 09 12:20:22 2020 -0600
+++ b/apt-cacher/client/tasks/main.yaml	Sun Feb 09 13:17:16 2020 -0600
@@ -1,7 +1,12 @@
 ---
 
+- name: check if running apt-cacher server
+  stat: path="/etc/apt-cacher-ng/acng.conf"
+  register: stat_server_conf
+
 - name: configure apt-cacher proxy
   become: yes
   template:
     src: "02proxy.j2"
     dest: "/etc/apt/apt.conf.d/02proxy"
+  when: not stat_server_conf.stat.exists