Преглед на файлове

Update playboot check certbot_file

Jean Sumara Leopoldo преди 5 години
родител
ревизия
619d4fdb7f
променени са 2 файла, в които са добавени 14 реда и са изтрити 2 реда
  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