mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-17 22:14:25 +02:00
Restructured webserver optimation roles
This commit is contained in:
parent
46bba3564d
commit
f15f498c1d
@ -95,6 +95,10 @@ roles:
|
|||||||
description: "Deployable web applications (GitLab, Nextcloud, Mastodon, etc.)"
|
description: "Deployable web applications (GitLab, Nextcloud, Mastodon, etc.)"
|
||||||
icon: "fas fa-docker"
|
icon: "fas fa-docker"
|
||||||
invokable: true
|
invokable: true
|
||||||
|
opt:
|
||||||
|
title: "Webserver Optimation"
|
||||||
|
description: "Tools which help to optimize webservers"
|
||||||
|
invokable: true
|
||||||
net:
|
net:
|
||||||
title: "Network"
|
title: "Network"
|
||||||
description: "Network setup (DNS, Let's Encrypt HTTP, WireGuard, etc.)"
|
description: "Network setup (DNS, Let's Encrypt HTTP, WireGuard, etc.)"
|
||||||
|
@ -14,7 +14,7 @@ galaxy_info:
|
|||||||
- domains
|
- domains
|
||||||
repository: "https://github.com/kevinveenbirkenbach/cymais"
|
repository: "https://github.com/kevinveenbirkenbach/cymais"
|
||||||
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
|
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"
|
min_ansible_version: "2.9"
|
||||||
platforms:
|
platforms:
|
||||||
- name: Any
|
- name: Any
|
@ -7,7 +7,7 @@ Automates the creation of Nginx server blocks that redirect all `www.` subdomain
|
|||||||
This role will:
|
This role will:
|
||||||
- **Discover** existing `*.conf` vhosts in your Nginx servers directory
|
- **Discover** existing `*.conf` vhosts in your Nginx servers directory
|
||||||
- **Filter** domains with or without your `primary_domain`
|
- **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) ⭐️
|
- **Optionally** include a wildcard redirect template (experimental) ⭐️
|
||||||
- **Clean up** leftover configs when running in cleanup mode 🧹
|
- **Clean up** leftover configs when running in cleanup mode 🧹
|
||||||
|
|
@ -3,9 +3,9 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
www_domains: "{{ current_play_domains_all | select('match', '^www\\.') | list }}"
|
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:
|
include_role:
|
||||||
name: web-svc-redir-domains
|
name: web-opt-rdr-domains
|
||||||
vars:
|
vars:
|
||||||
domain_mappings: "{{ www_domains
|
domain_mappings: "{{ www_domains
|
||||||
| map('regex_replace',
|
| map('regex_replace',
|
@ -104,9 +104,9 @@
|
|||||||
- name: "Load base roles"
|
- name: "Load base roles"
|
||||||
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
||||||
loop:
|
loop:
|
||||||
- drv
|
- drv # 1. Load driver roles
|
||||||
- gen
|
- gen # 2. Load generic roles
|
||||||
- net
|
- net # 3. Load network roles
|
||||||
- svc-db
|
- svc-db # 4. Load database roles
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item }}-roles.yml"
|
label: "{{ item }}-roles.yml"
|
@ -2,8 +2,8 @@
|
|||||||
- name: "setup docker role includes for desktop pc"
|
- name: "setup docker role includes for desktop pc"
|
||||||
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
||||||
loop:
|
loop:
|
||||||
- desk
|
- desk # 1. Load generic desktop roles
|
||||||
- util-desk
|
- util-desk # 2. Load utility desktop roles
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item }}-roles.yml"
|
label: "{{ item }}-roles.yml"
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
- name: "Include server roles"
|
- name: "Include server roles"
|
||||||
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
||||||
loop:
|
loop:
|
||||||
- svc-db
|
- web-svc # 1. Load web server services
|
||||||
- util-srv
|
- web-app # 2. Load (UI) web applications
|
||||||
- web-svc # Services need to run before applications
|
- util-srv # 3. Load web server collection roles
|
||||||
- web-app
|
- web-opt # 4. Load optimation scrips last
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item }}-roles.yml"
|
label: "{{ item }}-roles.yml"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: "Load destruction roles"
|
- name: "Load destruction roles"
|
||||||
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
include_tasks: "./tasks/groups/{{ item }}-roles.yml"
|
||||||
loop:
|
loop:
|
||||||
- svc-opt # Optimation services
|
- svc-opt # Load optimation services
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item }}-roles.yml"
|
label: "{{ item }}-roles.yml"
|
Loading…
x
Reference in New Issue
Block a user