mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-02-22 20:39:40 +01:00
Implemented role to recieve certs & do modification routines. Also optimized nextcloud
This commit is contained in:
parent
0805929d41
commit
8c951f6a19
@ -3,11 +3,12 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: docker-central-database
|
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:
|
include_role:
|
||||||
name: nginx-https-recieve-certificate
|
name: nginx-https-get-cert-modify-all
|
||||||
vars:
|
vars:
|
||||||
domain: "{{ item }}"
|
domain: "{{ item }}"
|
||||||
|
http: "{{ ports.localhost.http[application_id] }}"
|
||||||
loop:
|
loop:
|
||||||
- "{{ domains.mailu }}"
|
- "{{ domains.mailu }}"
|
||||||
- "{{ domain }}"
|
- "{{ domain }}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: "include role receive certbot certificate"
|
- name: "include role for {{application_id}} to recieve certs & do modification routines"
|
||||||
include_role:
|
include_role:
|
||||||
name: nginx-https-recieve-certificate
|
name: nginx-https-get-cert-modify-all
|
||||||
|
|
||||||
- name: configure {{domain}}.conf
|
- name: configure {{domain}}.conf
|
||||||
template:
|
template:
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: docker-central-database
|
name: docker-central-database
|
||||||
|
|
||||||
- name: "include role receive certbot certificate"
|
- name: "include role for {{application_id}} to recieve certs & do modification routines"
|
||||||
include_role:
|
include_role:
|
||||||
name: nginx-https-recieve-certificate
|
name: nginx-https-get-cert-modify-all
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domains.matrix_synapse}}"
|
domain: "{{domains.matrix_synapse}}"
|
||||||
http_port: "{{ports.localhost.http.matrix_synapse}}"
|
http_port: "{{ports.localhost.http.matrix_synapse}}"
|
||||||
|
@ -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"
|
- name: "include role receive certbot certificate"
|
||||||
include_role:
|
include_role:
|
||||||
name: nginx-https-recieve-certificate
|
name: nginx-https-get-cert
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domains[application_id]}}"
|
domain: "{{domains[application_id]}}"
|
||||||
|
|
||||||
|
@ -3,11 +3,12 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: docker-central-database
|
name: docker-central-database
|
||||||
|
|
||||||
- name: "include role receive certbot certificate"
|
- name: "include role for {{application_id}} to recieve certs & do modification routines"
|
||||||
include_role:
|
include_role:
|
||||||
name: nginx-https-recieve-certificate
|
name: nginx-https-get-cert-modify-all
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domains[application_id]}}"
|
domain: "{{domains[application_id]}}"
|
||||||
|
http: "{{ ports.localhost.http[application_id] }}"
|
||||||
|
|
||||||
- name: create nextcloud nginx proxy configuration file
|
- name: create nextcloud nginx proxy configuration file
|
||||||
template:
|
template:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: "include role receive certbot certificate"
|
- name: "include role for {{application_id}} to recieve certs & do modification routines"
|
||||||
include_role:
|
include_role:
|
||||||
name: nginx-https-recieve-certificate
|
name: nginx-https-get-cert-modify-all
|
||||||
|
|
||||||
- name: configure {{domain}}.conf
|
- name: configure {{domain}}.conf
|
||||||
template:
|
template:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
This role streamlines your Nginx configuration by performing several essential tasks:
|
This role streamlines your Nginx configuration by performing several essential tasks:
|
||||||
|
|
||||||
- **Modify Nginx configuration** with the `nginx-modifier-all` role.
|
- **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.
|
- **Deploy a domain configuration file** from a Jinja2 template.
|
||||||
- **Optionally secure your domain** with OAuth2 via the `docker-oauth2-proxy` role if enabled.
|
- **Optionally secure your domain** with OAuth2 via the `docker-oauth2-proxy` role if enabled.
|
||||||
|
|
||||||
|
@ -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:
|
include_role:
|
||||||
name: nginx-modifier-all
|
name: nginx-https-get-cert-modify-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: "copy nginx domain configuration to {{configuration_destination}}"
|
- name: "copy nginx domain configuration to {{configuration_destination}}"
|
||||||
template:
|
template:
|
||||||
|
7
roles/nginx-https-get-cert-modify-all/tasks/main.yml
Normal file
7
roles/nginx-https-get-cert-modify-all/tasks/main.yml
Normal 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
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: "include task receive certbot certificate"
|
- name: "include task receive certbot certificate"
|
||||||
include_role:
|
include_role:
|
||||||
name: nginx-https-recieve-certificate
|
name: nginx-https-get-cert
|
||||||
vars:
|
vars:
|
||||||
domain: "{{item.source}}"
|
domain: "{{item.source}}"
|
||||||
loop: "{{domain_mappings}}"
|
loop: "{{domain_mappings}}"
|
||||||
|
@ -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:
|
include_role:
|
||||||
name: nginx-modifier-all
|
name: nginx-https-get-cert-modify-all
|
||||||
|
|
||||||
- name: "include role nginx-https-recieve-certificate for {{domains[application_id]}}"
|
|
||||||
include_role:
|
|
||||||
name: nginx-https-recieve-certificate
|
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domains[application_id]}}"
|
domain: "{{domains[application_id]}}"
|
||||||
|
http: "{{ ports.localhost.http[application_id] }}"
|
||||||
|
|
||||||
- name: "generate {{domains[application_id]}}.conf"
|
- name: "generate {{domains[application_id]}}.conf"
|
||||||
template:
|
template:
|
||||||
|
@ -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:
|
include_role:
|
||||||
name: nginx-modifier-all
|
name: nginx-https-get-cert-modify-all
|
||||||
|
|
||||||
- name: "include role nginx-https-recieve-certificate for {{domains[application_id]}}"
|
|
||||||
include_role:
|
|
||||||
name: nginx-https-recieve-certificate
|
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domains[application_id]}}"
|
domain: "{{domains[application_id]}}"
|
||||||
|
http: "{{ ports.localhost.http[application_id] }}"
|
||||||
|
|
||||||
- name: "generate {{domains[application_id]}}.conf"
|
- name: "generate {{domains[application_id]}}.conf"
|
||||||
template:
|
template:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user