mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Restructured webserver optimation roles
This commit is contained in:
@@ -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.)"
|
||||
|
@@ -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
|
@@ -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 🧹
|
||||
|
@@ -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',
|
Reference in New Issue
Block a user