瀏覽代碼

Merge branch 'installer#7' into 'master'

Added a file to certbot and copied to folder /etc/cron.d/certbot

See merge request interlink-sa/flowdat3/modules/installer!65
Jean Sumara Leopoldo 4 年之前
父節點
當前提交
1ec261bba5
共有 5 個文件被更改,包括 35 次插入0 次删除
  1. 17 0
      tools/certbot_file
  2. 8 0
      tools/playbookSupport.yml
  3. 8 0
      tools/playbookUpdateSupport.yml
  4. 1 0
      tools/src/ReleaseImages.php
  5. 1 0
      tools/src/UpdateImages.php

+ 17 - 0
tools/certbot_file

@@ -0,0 +1,17 @@
+# /etc/cron.d/certbot: crontab entries for the certbot package
+#
+# Upstream recommends attempting renewal twice a day
+#
+# Eventually, this will be an opportunity to validate certificates
+# haven't been revoked, etc.  Renewal will only occur if expiration
+# is within 30 days.
+#
+# Important Note!  This cronjob will NOT be executed if you are
+# running systemd as your init system.  If you are running systemd,
+# the cronjob.timer function takes precedence over this cronjob.  For
+# more details, see the systemd.timer manpage, or use systemctl show
+# certbot.timer.
+SHELL=/bin/bash
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+@monthly root certbot renew  --deploy-hook=/opt/flowdat/letsencrypt/flowdat_deploy.sh >> /tmp/certbot

+ 8 - 0
tools/playbookSupport.yml

@@ -295,6 +295,14 @@
       command: sh get_supervisord_files.sh
       when: supervisord_files_result.stat.exists == True and supervisord_dir_result.stat.exists == False
 
+- name: "Certbot update file"
+  hosts: 127.0.0.1
+  connection: local
+  tags: certbot_file
+  tasks:
+    - name: Run chmod +x
+      command: chmod +x certbot_file
+
 - name: "Run up all. Tag=up_all"
   hosts: 127.0.0.1
   connection: local

+ 8 - 0
tools/playbookUpdateSupport.yml

@@ -111,6 +111,14 @@
       command: sh get_kea_files.sh
       when: kea_files_result.stat.exists == True
 
+- name: "Certbot update file"
+  hosts: 127.0.0.1
+  connection: local
+  tags: certbot_file
+  tasks:
+    - name: Run chmod +x
+      command: chmod +x certbot_file
+
 - name: "Run up all. Tag=up_all"
   hosts: 127.0.0.1
   connection: local

+ 1 - 0
tools/src/ReleaseImages.php

@@ -366,6 +366,7 @@ class ReleaseImages extends Command
             } else {
                 copy(getcwd() . "/playbookSupport.yml", $path . "/playbook.yml");
                 copy(getcwd() . "/get_supervisord_files.sh", $path . "/get_supervisord_files.sh");
+                copy(getcwd() . "/certbot_file", "/etc/cron.d/certbot");
 
                 // KEA selected for install, copy the file get_kea_files.sh
                 // otherwise delete the file if exists in the path

+ 1 - 0
tools/src/UpdateImages.php

@@ -187,6 +187,7 @@ class UpdateImages extends ReleaseImages
             }
 
             copy(getcwd() . "/get_supervisord_files.sh", $path . "/get_supervisord_files.sh");
+            copy(getcwd() . "/certbot_file", "/etc/cron.d/certbot");
         } catch (\Throwable $t) {
             $output->writeln($t->getTraceAsString());
         } finally {