mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Solved Matomo domain bug and refactored
This commit is contained in:
16
roles/nginx-domain-setup/README.md
Normal file
16
roles/nginx-domain-setup/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Nginx Domain Setup Role 🚀
|
||||
|
||||
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.
|
||||
- **Deploy a domain configuration file** from a Jinja2 template.
|
||||
- **Optionally secure your domain** with OAuth2 via the `docker-oauth2-proxy` role if enabled.
|
||||
|
||||
## Author
|
||||
|
||||
Developed by [Kevin Veen-Birkenbach](https://www.veen.world) 😎
|
||||
|
||||
---
|
||||
|
||||
Happy automating! 🎉
|
18
roles/nginx-domain-setup/tasks/main.yml
Normal file
18
roles/nginx-domain-setup/tasks/main.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
- name: "include role nginx-modifier-all for {{domain}}"
|
||||
include_role:
|
||||
name: nginx-modifier-all
|
||||
|
||||
- name: "include role nginx-https-recieve-certificate for {{domain}}"
|
||||
include_role:
|
||||
name: nginx-https-recieve-certificate
|
||||
|
||||
- name: "copy nginx domain configuration to {{nginx.directories.http.servers}}{{domain}}.conf"
|
||||
template:
|
||||
src: "roles/nginx-docker-reverse-proxy/templates/domain.conf.j2"
|
||||
dest: "{{nginx.directories.http.servers}}{{domain}}.conf"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "include the docker-oauth2-proxy role {{domain}}"
|
||||
include_role:
|
||||
name: docker-oauth2-proxy
|
||||
when: oauth2_proxy_active | bool
|
Reference in New Issue
Block a user