roles/nginx: Adjust certbot tasks

It seems that it is no longer recommended/supported to install the
standalone certbot-auto client on Ubuntu 20.04. We apparently need
to use the one provided by Ubuntu, which luckily includes a service
and timer to renew the certs.
This commit is contained in:
Alan Orth 2020-05-19 16:41:43 +03:00
parent 40ac858d60
commit 0587841476
1 changed files with 9 additions and 0 deletions

View File

@ -210,6 +210,15 @@
- name: Install certbot dependencies
apt: name={{ certbot_dependencies }} state=present update_cache=yes
when: ansible_distribution != 'Ubuntu' and ansible_distribution_major_version is version('20.04', '!=')
tags: letsencrypt
# On Ubuntu 20.04 it is no longer recommended/supported to use the standalone
# certbot-auto so I guess we need to use the one from the repositories.
- name: Install certbot (Ubuntu 20.04)
apt: name=certbot state=present update_cache=yes
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '==')
tags: letsencrypt
# vim: set ts=2 sw=2: