mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Removed unecessary application_id s
This commit is contained in:
21
roles/srv-web-7-7-letsencrypt/tasks/main.yml
Normal file
21
roles/srv-web-7-7-letsencrypt/tasks/main.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
- name: create nginx letsencrypt config file
|
||||
template:
|
||||
src: "letsencrypt.conf.j2"
|
||||
dest: "{{nginx.directories.http.global}}letsencrypt.conf"
|
||||
notify: restart nginx
|
||||
when: run_once_letsencrypt is not defined
|
||||
|
||||
- name: "Set CAA records for all base domains"
|
||||
include_tasks: set-caa-records.yml
|
||||
when:
|
||||
- dns_provider == 'cloudflare'
|
||||
- run_once_letsencrypt is not defined
|
||||
|
||||
- name: flush nginx service
|
||||
meta: flush_handlers
|
||||
when: run_once_letsencrypt is not defined
|
||||
|
||||
- name: run the letsencrypt logic just once
|
||||
set_fact:
|
||||
run_once_letsencrypt: true
|
||||
when: run_once_letsencrypt is not defined
|
15
roles/srv-web-7-7-letsencrypt/tasks/set-caa-records.yml
Normal file
15
roles/srv-web-7-7-letsencrypt/tasks/set-caa-records.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: "Ensure all CAA records are present"
|
||||
community.general.cloudflare_dns:
|
||||
api_token: "{{ certbot_dns_api_token }}"
|
||||
zone: "{{ item.0 }}"
|
||||
record: "@"
|
||||
type: CAA
|
||||
flag: 0
|
||||
tag: "{{ item.1.tag }}"
|
||||
value: "{{ item.1.value }}"
|
||||
ttl: 1
|
||||
state: present
|
||||
loop: "{{ base_sld_domains | product(caa_entries) | list }}"
|
||||
loop_control:
|
||||
label: "{{ item.0 }} → {{ item.1.tag }}"
|
Reference in New Issue
Block a user