ansible/roles/letsencrypt/tasks/main.yml in subspace-0.4.10 vs ansible/roles/letsencrypt/tasks/main.yml in subspace-0.4.11
- old
+ new
@@ -74,11 +74,22 @@
notify: start webserver
changed_when: true
- name: Setup cron job to auto renew
become: true
+ when: "'apache' in role_names"
cron:
name: Auto-renew SSL
- job: "{{certbot_dir}}/certbot-auto renew --quiet --no-self-upgrade"
+ job: "{{certbot_dir}}/certbot-auto renew --quiet --no-self-upgrade --apache"
+ hour: 0
+ minute: 33
+ state: present
+
+ - name: Setup cron job to auto renew
+ become: true
+ when: "'nginx' in role_names"
+ cron:
+ name: Auto-renew SSL
+ job: "{{certbot_dir}}/certbot-auto renew --quiet --no-self-upgrade --nginx"
hour: 0
minute: 33
state: present