mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
use nginx plugin for renewal
This commit is contained in:
parent
a49d4e63a1
commit
6962597e95
@ -4,7 +4,7 @@ certbot_auto_renew: true
|
||||
certbot_auto_renew_user: "{{ ansible_user | default(lookup('env', 'USER')) }}"
|
||||
certbot_auto_renew_hour: "3"
|
||||
certbot_auto_renew_minute: "30"
|
||||
certbot_auto_renew_options: "--quiet --no-self-upgrade"
|
||||
certbot_auto_renew_options: "--quiet --no-self-upgrade --nginx"
|
||||
|
||||
# Parameters used when creating new Certbot certs.
|
||||
certbot_create_if_missing: false
|
||||
|
12
tasks/install-nginx-plugin.yml
Normal file
12
tasks/install-nginx-plugin.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Add apt repository
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
state: present
|
||||
loop: "{{ certbot_nginx_plugin_apt_repos }}"
|
||||
|
||||
- name: Install nginx plugin
|
||||
package:
|
||||
name: "{{ certbot_nginx_plugin }}"
|
||||
state: present
|
@ -5,3 +5,6 @@
|
||||
- name: Set Certbot script variable.
|
||||
set_fact:
|
||||
certbot_script: "{{ certbot_package }}"
|
||||
|
||||
- import_tasks: install-nginx-plugin.yml
|
||||
when: "certbot_auto_renew_options is search('--nginx')"
|
||||
|
6
vars/Debian-9.yml
Normal file
6
vars/Debian-9.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
certbot_package: certbot
|
||||
certbot_nginx_plugin: python-certbot-nginx
|
||||
certbot_nginx_plugin_apt_repos:
|
||||
- deb http://deb.debian.org/debian stretch-backports main contrib non-free
|
||||
- deb-src http://deb.debian.org/debian stretch-backports main contrib non-free
|
@ -1,2 +1,5 @@
|
||||
---
|
||||
certbot_package: letsencrypt
|
||||
certbot_nginx_plugin: python-certbot-nginx
|
||||
certbot_nginx_plugin_apt_repos:
|
||||
- ppa:certbot/certbot
|
||||
|
5
vars/Ubuntu-18.04.yml
Normal file
5
vars/Ubuntu-18.04.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
certbot_package: certbot
|
||||
certbot_nginx_plugin: python-certbot-nginx
|
||||
certbot_nginx_plugin_apt_repos:
|
||||
- ppa:certbot/certbot
|
@ -1,2 +1,4 @@
|
||||
---
|
||||
certbot_package: certbot
|
||||
certbot_nginx_plugin: python2-certbot-nginx
|
||||
certbot_nginx_plugin_apt_repos: []
|
||||
|
Loading…
x
Reference in New Issue
Block a user