diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-10-06 13:18:33 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-10-06 13:18:33 +0300 |
| commit | 29eb2e6cc469d9534c2586e98b782f1879bd8c76 (patch) | |
| tree | ef2d0bd53087b04bc395dd96d7f6da9bfe69b470 /tasks | |
| parent | 0bf8f1d7f9e477b2de52ab1e7aea000eff8666fe (diff) | |
Refactor, add certbot to cron
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/jail_ingress.yml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tasks/jail_ingress.yml b/tasks/jail_ingress.yml index 53b8f67..d5cb2e7 100644 --- a/tasks/jail_ingress.yml +++ b/tasks/jail_ingress.yml @@ -40,7 +40,7 @@ # generated by certbot. Certbot will fail validation if nginx.conf is configured too early. - name: Configure nginx.conf template: - src: usr_local_etc_nginx_nginx.conf.j2 + src: ingress/usr_local_etc_nginx_nginx.conf.j2 dest: /usr/local/jails/containers/ingress/usr/local/etc/nginx/nginx.conf owner: root group: wheel @@ -64,3 +64,21 @@ service -j ingress nginx enable service -j ingress nginx onestart when: ingress_nginx_enabled.rc != 0 + +- name: Set up crontab + template: + src: ingress/etc_crontab.j2 + dest: /usr/local/jails/containers/ingress/etc/crontab + owner: root + group: wheel + mode: "0644" + vars: + # comma-separated list of sites + items: "{{ static_sites | selectattr('tls') | map(attribute='host') | join(',') }}" + register: jail_ingress_etc_crontab + +- name: Restart cron + service: + name: cron + state: restarted + when: jail_ingress_etc_crontab.changed |
