Explorar o código

Only touch blacklist if missing

Markus Lindenberg %!s(int64=9) %!d(string=hai) anos
pai
achega
568247dd8d
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      roles/mesh-vpn-fastd/tasks/blacklist.yml

+ 4 - 0
roles/mesh-vpn-fastd/tasks/blacklist.yml

@@ -1,7 +1,11 @@
 ---
 
+- name: Check if blacklist file exists
+  stat: path=/etc/fastd/fastd-blacklist.json
+  register: blacklist
 - name: Ensure blacklist file exists
   file: name=/etc/fastd/fastd-blacklist.json state=touch owner=fastd
+  when: not blacklist.stat.exists
 
 - name: Install crontab to update the blacklist
   cron: