Implemented role to recieve certs & do modification routines. Also optimized nextcloud

This commit is contained in:
Kevin Veen-Birkenbach 2025-02-21 09:28:01 +01:00
parent 0805929d41
commit 8c951f6a19
15 changed files with 40 additions and 49 deletions

View File

@ -3,11 +3,12 @@
include_role:
name: docker-central-database
- name: "include tasks to receive attendize certbot certificate"
- name: "include role for {{application_id}} to recieve certs & do modification routines"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
vars:
domain: "{{ item }}"
http: "{{ ports.localhost.http[application_id] }}"
loop:
- "{{ domains.mailu }}"
- "{{ domain }}"

View File

@ -1,6 +1,6 @@
- name: "include role receive certbot certificate"
- name: "include role for {{application_id}} to recieve certs & do modification routines"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
- name: configure {{domain}}.conf
template:

View File

@ -3,9 +3,9 @@
include_role:
name: docker-central-database
- name: "include role receive certbot certificate"
- name: "include role for {{application_id}} to recieve certs & do modification routines"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
vars:
domain: "{{domains.matrix_synapse}}"
http_port: "{{ports.localhost.http.matrix_synapse}}"

View File

@ -1,8 +1,8 @@
# Recieves https certificate and setup proxy with domain replace
{# Recieves https certificate and setup proxy with domain replace #}
- name: "include role receive certbot certificate"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert
vars:
domain: "{{domains[application_id]}}"

View File

@ -3,11 +3,12 @@
include_role:
name: docker-central-database
- name: "include role receive certbot certificate"
- name: "include role for {{application_id}} to recieve certs & do modification routines"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
vars:
domain: "{{domains[application_id]}}"
http: "{{ ports.localhost.http[application_id] }}"
- name: create nextcloud nginx proxy configuration file
template:

View File

@ -1,6 +1,6 @@
- name: "include role receive certbot certificate"
- name: "include role for {{application_id}} to recieve certs & do modification routines"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
- name: configure {{domain}}.conf
template:

View File

@ -3,7 +3,7 @@
This role streamlines your Nginx configuration by performing several essential tasks:
- **Modify Nginx configuration** with the `nginx-modifier-all` role.
- **Request and receive HTTPS certificates** using the `nginx-https-recieve-certificate` role.
- **Request and receive HTTPS certificates** using the `nginx-https-get-cert` role.
- **Deploy a domain configuration file** from a Jinja2 template.
- **Optionally secure your domain** with OAuth2 via the `docker-oauth2-proxy` role if enabled.

View File

@ -1,18 +1,6 @@
- name: "include role nginx-modifier-all for {{domain}}"
- name: "include role for {{domain}} to recieve certificates and do the modification routines"
include_role:
name: nginx-modifier-all
- name: "Relevant variables for role: {{ role_path | basename }}"
debug:
msg:
domain: "{{domain}}"
domains: "{{domains}}"
applications: "{{applications}}"
when: enable_debug | bool
- name: "include role nginx-https-recieve-certificate for {{domain}}"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
- name: "copy nginx domain configuration to {{configuration_destination}}"
template:

View File

@ -0,0 +1,7 @@
- name: "include role nginx-modifier-all for {{domain}}"
include_role:
name: nginx-modifier-all
- name: "include role nginx-https-get-cert for {{domain}}"
include_role:
name: nginx-https-get-cert

View File

@ -1,7 +1,7 @@
---
- name: "include task receive certbot certificate"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert
vars:
domain: "{{item.source}}"
loop: "{{domain_mappings}}"

View File

@ -1,13 +1,10 @@
---
- name: "include role nginx-modifier-all for {{domains[application_id]}}"
- name: "include role for {{application_id}} to recieve certs & do modification routines"
include_role:
name: nginx-modifier-all
- name: "include role nginx-https-recieve-certificate for {{domains[application_id]}}"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
vars:
domain: "{{domains[application_id]}}"
http: "{{ ports.localhost.http[application_id] }}"
- name: "generate {{domains[application_id]}}.conf"
template:

View File

@ -1,13 +1,10 @@
---
- name: "include role nginx-modifier-all for {{domains[application_id]}}"
- name: "include role for {{application_id}} to recieve certs & do modification routines"
include_role:
name: nginx-modifier-all
- name: "include role nginx-https-recieve-certificate for {{domains[application_id]}}"
include_role:
name: nginx-https-recieve-certificate
name: nginx-https-get-cert-modify-all
vars:
domain: "{{domains[application_id]}}"
http: "{{ ports.localhost.http[application_id] }}"
- name: "generate {{domains[application_id]}}.conf"
template: