Restructured webserver optimation roles

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-12 18:08:44 +02:00
parent 46bba3564d
commit f15f498c1d
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
15 changed files with 19 additions and 15 deletions

View File

@ -95,6 +95,10 @@ roles:
description: "Deployable web applications (GitLab, Nextcloud, Mastodon, etc.)"
icon: "fas fa-docker"
invokable: true
opt:
title: "Webserver Optimation"
description: "Tools which help to optimize webservers"
invokable: true
net:
title: "Network"
description: "Network setup (DNS, Let's Encrypt HTTP, WireGuard, etc.)"

View File

@ -14,7 +14,7 @@ galaxy_info:
- domains
repository: "https://github.com/kevinveenbirkenbach/cymais"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/web-svc-redir-domains"
documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/web-opt-rdr-domains"
min_ansible_version: "2.9"
platforms:
- name: Any

View File

@ -7,7 +7,7 @@ Automates the creation of Nginx server blocks that redirect all `www.` subdomain
This role will:
- **Discover** existing `*.conf` vhosts in your Nginx servers directory
- **Filter** domains with or without your `primary_domain`
- **Generate** redirect rules via the `web-svc-redir-domains` role
- **Generate** redirect rules via the `web-opt-rdr-domains` role
- **Optionally** include a wildcard redirect template (experimental) ⭐️
- **Clean up** leftover configs when running in cleanup mode 🧹

View File

@ -3,9 +3,9 @@
set_fact:
www_domains: "{{ current_play_domains_all | select('match', '^www\\.') | list }}"
- name: Include web-svc-redir-domains role for www-to-bare redirects
- name: Include web-opt-rdr-domains role for www-to-bare redirects
include_role:
name: web-svc-redir-domains
name: web-opt-rdr-domains
vars:
domain_mappings: "{{ www_domains
| map('regex_replace',

View File

@ -104,9 +104,9 @@
- name: "Load base roles"
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
loop:
- drv
- gen
- net
- svc-db
- drv # 1. Load driver roles
- gen # 2. Load generic roles
- net # 3. Load network roles
- svc-db # 4. Load database roles
loop_control:
label: "{{ item }}-roles.yml"

View File

@ -2,8 +2,8 @@
- name: "setup docker role includes for desktop pc"
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
loop:
- desk
- util-desk
- desk # 1. Load generic desktop roles
- util-desk # 2. Load utility desktop roles
loop_control:
label: "{{ item }}-roles.yml"

View File

@ -13,9 +13,9 @@
- name: "Include server roles"
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
loop:
- svc-db
- util-srv
- web-svc # Services need to run before applications
- web-app
- web-svc # 1. Load web server services
- web-app # 2. Load (UI) web applications
- util-srv # 3. Load web server collection roles
- web-opt # 4. Load optimation scrips last
loop_control:
label: "{{ item }}-roles.yml"

View File

@ -1,6 +1,6 @@
- name: "Load destruction roles"
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
loop:
- svc-opt # Optimation services
- svc-opt # Load optimation services
loop_control:
label: "{{ item }}-roles.yml"