feat(server/certbot): add support for certbot
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
282d61d808
commit
90bac3a306
4 changed files with 23 additions and 0 deletions
|
@ -4,3 +4,6 @@ servers:
|
||||||
poincare:
|
poincare:
|
||||||
maxwell:
|
maxwell:
|
||||||
system_sshd_port: 6969
|
system_sshd_port: 6969
|
||||||
|
|
||||||
|
vars:
|
||||||
|
cloudflare_token: None
|
||||||
|
|
7
roles/server/certbot/tasks/install.yml
Normal file
7
roles/server/certbot/tasks/install.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: Install the Certbot and Cloudflare plugin
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- certbot
|
||||||
|
- python3-certbot-dns-cloudflare
|
||||||
|
state: present
|
12
roles/server/certbot/tasks/main.yml
Normal file
12
roles/server/certbot/tasks/main.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- name: Packages
|
||||||
|
ansible.builtin.include_tasks: install.yml
|
||||||
|
tags: install
|
||||||
|
|
||||||
|
- name: Install the Cloudflare secrets
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: templates/cloudflare.ini
|
||||||
|
dest: /root/.secrets/cloudflare.ini
|
||||||
|
mode: 0600
|
||||||
|
owner: root
|
||||||
|
group: root
|
1
roles/server/certbot/templates/cloudflare.ini
Normal file
1
roles/server/certbot/templates/cloudflare.ini
Normal file
|
@ -0,0 +1 @@
|
||||||
|
dns_cloudflare_api_token = {{ cloudflare_token }}
|
Loading…
Reference in a new issue