ソースを参照

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