diff options
Diffstat (limited to 'roles/letsencrypt')
-rw-r--r-- | roles/letsencrypt/tasks/main.yml | 10 |
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 |