2016-06-27 22:52:39 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Copy systemd service to renew Let's Encrypt certs
|
|
|
|
template: src=renew-letsencrypt.service.j2 dest=/etc/systemd/system/renew-letsencrypt.service mode=0644 owner=root group=root
|
|
|
|
|
|
|
|
- name: Copy systemd timer to renew Let's Encrypt certs
|
|
|
|
copy: src=renew-letsencrypt.timer dest=/etc/systemd/system/renew-letsencrypt.timer mode=0644 owner=root group=root
|
|
|
|
|
2017-10-31 22:18:15 +01:00
|
|
|
# always issues daemon-reload just in case the server/timer changed
|
2016-06-27 22:52:39 +02:00
|
|
|
- name: Start and enable systemd timer to renew Let's Encrypt certs
|
2017-10-31 22:18:15 +01:00
|
|
|
systemd: name=renew-letsencrypt.timer state=started enabled=yes daemon_reload=yes
|
2016-06-27 22:52:39 +02:00
|
|
|
|
|
|
|
- name: Download certbot
|
|
|
|
get_url: dest={{ letsencrypt_certbot_dest }} url=https://dl.eff.org/certbot-auto mode=700
|
|
|
|
|
2016-10-09 13:06:06 +02:00
|
|
|
- name: Install certbot dependencies (Ubuntu 16.04)
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('16.04', '==')
|
2018-04-25 19:01:39 +02:00
|
|
|
apt: name={{ letsencrypt_ubuntu_xenial_deps }} state=present update_cache=yes
|
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
- letsencrypt
|
2016-10-09 13:06:06 +02:00
|
|
|
|
2018-04-25 18:40:33 +02:00
|
|
|
- name: Install certbot dependencies (Ubuntu 18.04)
|
|
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('18.04', '==')
|
|
|
|
apt: name={{ letsencrypt_ubuntu_bionic_deps }} state=present update_cache=yes
|
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
- letsencrypt
|
|
|
|
|
2017-02-16 17:15:06 +01:00
|
|
|
- name: Install certbot dependencies (Debian 9)
|
2018-03-21 20:17:21 +01:00
|
|
|
when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version_compare('9', '==')
|
2018-04-25 19:02:42 +02:00
|
|
|
apt: name={{ letsencrypt_debian_stretch_deps }} state=present update_cache=yes
|
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
- letsencrypt
|
2017-02-16 17:15:06 +01:00
|
|
|
|
2016-06-27 22:52:39 +02:00
|
|
|
# vim: set ts=2 sw=2:
|