mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 15:28:12 +02:00
Nginx variable refactoring and general bug solving. Got interupted commit not tested
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Find all .conf
|
||||
ansible.builtin.find:
|
||||
paths: "{{nginx_servers_directory}}"
|
||||
paths: "{{nginx.directories.http.servers}}"
|
||||
patterns: '*.*.conf'
|
||||
register: conf_files
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
set_fact:
|
||||
filtered_domains: "{{ conf_files.files | map(attribute='path') | map('regex_search', domain_regex) | select('string') | map('regex_replace', path_regex, '') | map('regex_replace', '.conf$', '') | list }}"
|
||||
vars:
|
||||
domain_regex: "^{{ nginx_servers_directory }}(?!www\\.)[^/]+\\.conf$"
|
||||
path_regex: "^{{ nginx_servers_directory }}"
|
||||
domain_regex: "^{{nginx.directories.http.servers}}(?!www\\.)[^/]+\\.conf$"
|
||||
path_regex: "^{{nginx.directories.http.servers}}"
|
||||
|
||||
- name: The domains for which a www. redirect will be implemented
|
||||
debug:
|
||||
|
Reference in New Issue
Block a user