Skip to content

Commit

Permalink
Merge pull request coopdevs#14 from fapdash/add_variable_for_certbot_…
Browse files Browse the repository at this point in the history
…version

Add variable for certbot version
  • Loading branch information
enricostano authored Mar 23, 2019
2 parents bfe66fa + 4233ece commit 6fefed0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Role Variables
domain_name: www.mydomain.io
letsencrypt_email: [email protected]
certbot_nginx_cert_name: mycert # optional
certbot_version: 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1 # optional
certbot_nginx_version: 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1 # optional
```
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/`.
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
---
letsencrypt_staging: false
certbot_version: 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
certbot_nginx_version: 0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

- name: Install certbot
package:
name: "certbot=0.31.0-1+ubuntu{{ ansible_distribution_version }}.1+certbot+1"
name: "certbot={{ certbot_version }}"
state: present

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

- import_tasks: certificate.yml
Expand Down

0 comments on commit 6fefed0

Please sign in to comment.