Skip to content

Commit 6fefed0

Browse files
authored
Merge pull request #14 from fapdash/add_variable_for_certbot_version
Add variable for certbot version
2 parents bfe66fa + 4233ece commit 6fefed0

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Role Variables
1515
domain_name: www.mydomain.io
1616
letsencrypt_email: myaccount@letsencrypt.org
1717
certbot_nginx_cert_name: mycert # optional
18+
certbot_version: 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1 # optional
19+
certbot_nginx_version: 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1 # optional
1820
```
1921
2022
if set, `certbot_nginx_cert_name`'s value will be passed to the certbot's `--cert-name` argument, which is used to identify the certificate in certbot command such as `certbot delete`. You will see a list of certificates identified with this name by running `certbot certificates`. This name will also be used as the file paths for the certificate in `/etc/letsencrypt/live/`.

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
---
22
letsencrypt_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

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
- name: Install certbot
88
package:
9-
name: "certbot=0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1"
9+
name: "certbot={{ certbot_version }}"
1010
state: present
1111

1212
- name: Install certbot-nginx plugin
1313
package:
14-
name: "python-certbot-nginx=0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1"
14+
name: "python-certbot-nginx={{ certbot_nginx_version }}"
1515
state: present
1616

1717
- import_tasks: certificate.yml

0 commit comments

Comments
 (0)