Explorar o código

Update playboot check certbot_file

Jean Sumara Leopoldo %!s(int64=5) %!d(string=hai) anos
pai
achega
619d4fdb7f
Modificáronse 2 ficheiros con 14 adicións e 2 borrados
  1. 7 1
      tools/playbookSupport.yml
  2. 7 1
      tools/playbookUpdateSupport.yml

+ 7 - 1
tools/playbookSupport.yml

@@ -298,10 +298,16 @@
 - name: "Certbot update file"
   hosts: 127.0.0.1
   connection: local
-  tags: certbot_file
+  tags: certbot_files
   tasks:
+    - name: Check if certbot_file exists
+        stat:
+          path: certbot_file
+        register: certbot_files_result
+
     - name: Run chmod +x
       command: chmod +x certbot_file
+      when: certbot_files_result.stat.exists == True
 
 - name: "Run up all. Tag=up_all"
   hosts: 127.0.0.1

+ 7 - 1
tools/playbookUpdateSupport.yml

@@ -114,10 +114,16 @@
 - name: "Certbot update file"
   hosts: 127.0.0.1
   connection: local
-  tags: certbot_file
+  tags: certbot_files
   tasks:
+    - name: Check if certbot_file exists
+        stat:
+          path: certbot_file
+        register: certbot_files_result
+
     - name: Run chmod +x
       command: chmod +x certbot_file
+      when: certbot_files_result.stat.exists == True
 
 - name: "Run up all. Tag=up_all"
   hosts: 127.0.0.1