mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Add possiblity to install certbot plugins
This commit is contained in:
parent
09b5bd20e9
commit
1ce5d87ca0
16
README.md
16
README.md
@ -81,6 +81,18 @@ Let's Encrypt supports [generating wildcard certificates](https://community.lets
|
|||||||
|
|
||||||
Michael Porter also has a walkthrough of [Creating A Let’s Encrypt Wildcard Cert With Ansible](https://www.michaelpporter.com/2018/09/creating-a-wildcard-cert-with-ansible/), specifically with Cloudflare.
|
Michael Porter also has a walkthrough of [Creating A Let’s Encrypt Wildcard Cert With Ansible](https://www.michaelpporter.com/2018/09/creating-a-wildcard-cert-with-ansible/), specifically with Cloudflare.
|
||||||
|
|
||||||
|
## Install plugins
|
||||||
|
|
||||||
|
Let's Encrypt has some plugins. It's possible to install them, but only if you install from source:
|
||||||
|
|
||||||
|
certbot_install_from_source: true
|
||||||
|
certbot_plugins:
|
||||||
|
- dns-route53
|
||||||
|
|
||||||
|
When usin plugins, you have to execute `cerbot` from path, so you should set a `certbot_create_command` that doesn't use `certbot_script`, as this example:
|
||||||
|
|
||||||
|
"certbot certonly --noninteractive --agree-tos --email {{ cert_item.email | default(certbot_admin_email) }} -d {{ cert_item.domains | join(',') }} --dns-route53"
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
None.
|
None.
|
||||||
@ -88,12 +100,12 @@ None.
|
|||||||
## Example Playbook
|
## Example Playbook
|
||||||
|
|
||||||
- hosts: servers
|
- hosts: servers
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
certbot_auto_renew_user: your_username_here
|
certbot_auto_renew_user: your_username_here
|
||||||
certbot_auto_renew_minute: 20
|
certbot_auto_renew_minute: 20
|
||||||
certbot_auto_renew_hour: 5
|
certbot_auto_renew_hour: 5
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- geerlingguy.certbot
|
- geerlingguy.certbot
|
||||||
|
|
||||||
|
@ -15,3 +15,12 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ certbot_script }}"
|
path: "{{ certbot_script }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Install plugins
|
||||||
|
pip:
|
||||||
|
name: "file://{{ my_certbot_dir}}/certbot-{{ item }}/"
|
||||||
|
state: present
|
||||||
|
extra_args: --upgrade
|
||||||
|
with_items:
|
||||||
|
- "{{ certbot_plugins }}"
|
||||||
|
when: certbot_plugins is defined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user