mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Solved certificate bug
This commit is contained in:
@@ -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 `nginx-redirect-domain` role
|
||||
- **Generate** redirect rules via the `nginx-redirect-domains` role
|
||||
- **Optionally** include a wildcard redirect template (experimental) ⭐️
|
||||
- **Clean up** leftover configs when running in cleanup mode 🧹
|
||||
|
||||
@@ -20,5 +20,5 @@ Ensure that any request to `www.example.com` automatically and permanently redir
|
||||
- **Auto-Discovery**: Scans your Nginx `servers` directory for `.conf` files. 🔍
|
||||
- **Dynamic Redirects**: Builds `source: "www.domain"` → `target: "domain"` mappings on the fly. 🔧
|
||||
- **Wildcard Redirect**: Includes a templated wildcard server block for `www.*` domains (toggleable). ✨
|
||||
- **Cleanup Mode**: Removes the wildcard config file when `certbot_flavor` is set to `dedicated` and `mode_cleanup` is enabled. 🗑️
|
||||
- **Cleanup Mode**: Removes the wildcard config file when `certbot_flavor` is set to `dedicated` and `mode_cleanup` is enabled. 🗑️
|
||||
- **Debug Output**: Optional `enable_debug` gives detailed variable dumps for troubleshooting. 🐛
|
||||
|
@@ -8,9 +8,9 @@
|
||||
set_fact:
|
||||
www_domains: "{{ all_domains | select('match', '^www\\.') | list }}"
|
||||
|
||||
- name: Include nginx-redirect-domain role for www-to-bare redirects
|
||||
- name: Include nginx-redirect-domains role for www-to-bare redirects
|
||||
include_role:
|
||||
name: nginx-redirect-domain
|
||||
name: nginx-redirect-domains
|
||||
vars:
|
||||
domain_mappings: "{{ www_domains
|
||||
| map('regex_replace',
|
||||
|
Reference in New Issue
Block a user