diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-12 08:35:07 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-12 08:35:07 +0000 |
commit | 77e293e36d741a7f6e318672061d522d9dc35f6b (patch) | |
tree | 7bc410d83c320c2e1caabd5fdd911e37aeadc9a8 | |
parent | 95fa88b76a45cf751c3746231105d9de81aa13b2 (diff) | |
parent | 89d08cb902eaba0eca6bd99d01971ae91ace7f84 (diff) | |
download | obnam2-77e293e36d741a7f6e318672061d522d9dc35f6b.tar.gz |
Merge branch 'cron' into 'main'
fix: install cron job to renew Let's Encrypt certificate weekly
Closes #59
See merge request larswirzenius/obnam!114
-rw-r--r-- | ansible/obnam-server.yml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ansible/obnam-server.yml b/ansible/obnam-server.yml index 8837f1b..43d5dc8 100644 --- a/ansible/obnam-server.yml +++ b/ansible/obnam-server.yml @@ -30,6 +30,15 @@ - dehydrated-apache2 when: domain is defined + - name: "install cron job to update TLS certificates" + cron: + name: "dehydrated" + cron_file: "dehydrated" + user: root + minute: "0" + hour: "0" + job: "systemctl stop obnam; systemctl start apache2; dehydrated -c; systemctl stop apache2; systemctl start obnam" + - name: create Obnam configuration directory file: path: /etc/obnam @@ -101,7 +110,6 @@ tls_key_path: "/var/lib/dehydrated/certs/{{ domain }}/privkey.pem" tls_cert_path: "/var/lib/dehydrated/certs/{{ domain }}/cert.pem" - apt_signing_key: | -----BEGIN PGP PUBLIC KEY BLOCK----- @@ -132,4 +140,3 @@ GSJSdir7NkZidgwoCPA7BTqsb5LN =dXB0 -----END PGP PUBLIC KEY BLOCK----- - |