File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22letsencrypt_staging : false
3- certbot_version : 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
4- certbot_nginx_version : 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ galaxy_info:
1313 versions :
1414 - xenial
1515 - bionic
16+ - focal
1617
1718 galaxy_tags :
1819 - certbot
Original file line number Diff line number Diff line change 2222 --cert-name '{{ certbot_nginx_cert_name }}'
2323 {% endif %}
2424 {% if letsencrypt_staging %} --staging {% endif %}
25- when : letsencrypt_cert.stat.exists and certbot_force_update is defined
25+ {% if ansible_distribution_version >= "20.04" %} --non-interactive {% endif %}
26+ when : letsencrypt_cert.stat.exists and certbot_force_update == true
2627 notify : reload nginx
Original file line number Diff line number Diff line change 11---
2+
3+ - name : Set Certbot package name and versions (Ubuntu >= 20.04)
4+ set_fact :
5+ certbot_version : 0.40.0-1
6+ certbot_nginx_version : 0.40.0-0ubuntu0.1
7+ certbot_nginx_name : python3-certbot-nginx
8+ when : ansible_distribution_version >= "20.04"
9+
10+ - name : Set Certbot package name and versions (Ubuntu < 20.04)
11+ set_fact :
12+ certbot_version : 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
13+ certbot_nginx_version : 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
14+ certbot_nginx_name : python-certbot-nginx
15+ when : ansible_distribution_version < "20.04"
16+
217- name : Add certbot repository
318 apt_repository :
419 repo : ' ppa:certbot/certbot'
520 state : present
21+ when : ansible_distribution_version < "20.04"
622
723- name : Install certbot
824 package :
1127
1228- name : Install certbot-nginx plugin
1329 package :
14- name : " python-certbot-nginx ={{ certbot_nginx_version }}"
30+ name : " {{ certbot_nginx_name }} ={{ certbot_nginx_version }}"
1531 state : present
1632
1733- import_tasks : certificate.yml
You can’t perform that action at this time.
0 commit comments