summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2017-11-24 16:06:38 +0200
committerBenjamin Copeland <ben.copeland@linaro.org>2017-11-29 15:00:55 +0000
commit52cc344cda395f1c39df45abc9353500549e8e43 (patch)
treefdd7f8ee04172599cb9c13bf32eab8bf0f2c5e7f
parent0b89a23b63d0cb84f1052370a4e9415a8463743c (diff)
downloadansible-playbooks-52cc344cda395f1c39df45abc9353500549e8e43.tar.gz
letsencrypt: support stretch
- package is renamed to certbot - certbot ships with systemd timer unit so cron not needed Change-Id: I08631c35103062912af32bf47f9839ecc0f23b29 Reviewed-on: https://review.linaro.org/22732 Reviewed-by: Benjamin Copeland <ben.copeland@linaro.org>
-rw-r--r--roles/letsencrypt/tasks/main.yml10
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/letsencrypt/tasks/main.yml b/roles/letsencrypt/tasks/main.yml
index a41b9aa1..15ad04d6 100644
--- a/roles/letsencrypt/tasks/main.yml
+++ b/roles/letsencrypt/tasks/main.yml
@@ -7,11 +7,19 @@
- python-letsencrypt-apache
when: ansible_distribution_release == "xenial"
+- name: Install letsencrypt client for Stretch
+ apt: pkg={{item}} state=installed
+ with_items:
+ - certbot
+ - python-certbot-apache
+ when: ansible_distribution_release == "stretch"
+
- name: Install cert for {{hostname}}
command: letsencrypt -n --apache --agree-tos --email "{{email}}" -d "{{hostname}}"
args:
creates: /etc/letsencrypt/live/{{hostname}}/fullchain.pem
- when: ansible_distribution_release == "xenial"
+ when: ( ansible_distribution_release == "xenial" ) or
+ ( ansible_distribution_release == "stretch" )
- name: Ensure letsencrypt renewal cron is installed
template: src=letsencrypt-crontab.cron dest=/etc/cron.d/letsencrypt-crontab