Optimized nginx health-check and some regex

This commit is contained in:
2023-12-12 17:43:13 +01:00
parent 78ee502ba4
commit 04b3ce18e0
2 changed files with 28 additions and 27 deletions

View File

@@ -16,12 +16,8 @@
debug:
var: filtered_domains
- name: Prepare redirect domain mappings
set_fact:
redirect_domain_mappings: "{{ filtered_domains | map('regex_replace', '^(.*)$', '{ source: \"www.\\1\", target: \"\\1\" }') | map('from_yaml') | list }}"
- name: Include nginx-domain-redirect role with dynamic domain mappings
include_role:
name: nginx-domain-redirect
vars:
domain_mappings: "{{ redirect_domain_mappings }}"
domain_mappings: "{{ filtered_domains | map('regex_replace', '^(.*)$', '{ source: \"www.\\1\", target: \"\\1\" }') | map('from_yaml') | list }}"