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 | bool
2627 notify : reload nginx
Original file line number Diff line number Diff line change 11---
2+ - name : Set Certbot package name and versions (Ubuntu >= 20.04)
3+ set_fact :
4+ certbot_version : 0.40.0-1
5+ certbot_nginx_version : 0.40.0-0ubuntu0.1
6+ certbot_nginx_name : python3-certbot-nginx
7+ when : ansible_distribution_version >= "20.04"
8+
9+ - name : Set Certbot package name and versions (Ubuntu < 20.04)
10+ set_fact :
11+ certbot_version : 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
12+ certbot_nginx_version : 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
13+ certbot_nginx_name : python-certbot-nginx
14+ when : ansible_distribution_version < "20.04"
15+
216- name : Add certbot repository
317 apt_repository :
418 repo : ' ppa:certbot/certbot'
519 state : present
20+ when : ansible_distribution_version < "20.04"
621
722- name : Install certbot
823 package :
1126
1227- name : Install certbot-nginx plugin
1328 package :
14- name : " python-certbot-nginx ={{ certbot_nginx_version }}"
29+ name : " {{ certbot_nginx_name }} ={{ certbot_nginx_version }}"
1530 state : present
1631
1732- import_tasks : certificate.yml
You can’t perform that action at this time.
0 commit comments