diff options
-rw-r--r-- | roles/letsencrypt/tasks/main.yml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/letsencrypt/tasks/main.yml b/roles/letsencrypt/tasks/main.yml index 6b3fa6f..a41b9aa 100644 --- a/roles/letsencrypt/tasks/main.yml +++ b/roles/letsencrypt/tasks/main.yml @@ -5,12 +5,14 @@ with_items: - letsencrypt - python-letsencrypt-apache - when: "ansible_distribution_major_version >= 16" + when: ansible_distribution_release == "xenial" - 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" - name: Ensure letsencrypt renewal cron is installed template: src=letsencrypt-crontab.cron dest=/etc/cron.d/letsencrypt-crontab + when: ansible_distribution_release == "xenial" |