mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-21 20:31:02 +01:00
Solved regex bug
This commit is contained in:
parent
ca96808208
commit
4d3a6128c9
@ -7,9 +7,10 @@
|
||||
|
||||
- name: Filter domain names and remove .conf extension and path
|
||||
set_fact:
|
||||
filtered_domains: "{{ conf_files.files | map(attribute='path') | map('regex_search', domain_regex) | select('string') | map('regex_replace', '^{{nginx_servers_directory}}', '') | map('regex_replace', '.conf$', '') | list }}"
|
||||
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$'
|
||||
domain_regex: "^{{ nginx_servers_directory }}(?!www\\.)[^/]+\\.conf$"
|
||||
path_regex: "^{{ nginx_servers_directory }}"
|
||||
|
||||
- name: The domains for which a www. redirect will be implemented
|
||||
debug:
|
||||
|
Loading…
Reference in New Issue
Block a user