♻: manage san for certificate/domain/sni routing
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m24s
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m24s
This commit is contained in:
@@ -11,7 +11,17 @@
|
||||
dns_serial: "{{ ansible_date_time.epoch }}"
|
||||
web_hostname_block: |-
|
||||
{% for webserver in groups['webservers'] | sort -%}
|
||||
{% for web_hostname in (hostvars[webserver]['web_hostname'] | selectattr('host', 'match', '.*' ~ item.name) | map(attribute='host') | sort) -%}
|
||||
{% for web_hostname in (
|
||||
(hostvars[webserver]['web_hostname']
|
||||
| selectattr('host', 'match', '.*' ~ item.name)
|
||||
| map(attribute='host')
|
||||
+
|
||||
(hostvars[webserver]['web_hostname']
|
||||
| selectattr('san', 'defined')
|
||||
| map(attribute='san')
|
||||
| flatten
|
||||
| select('match', '.*' ~ item.name)))
|
||||
| sort) -%}
|
||||
{% if web_hostname is match("(\S+\.){2}") %}
|
||||
{{ web_hostname | regex_replace('\.' ~ item.name ~ '$', '') }} IN CNAME {{ hostvars[webserver].ansible_host }}.
|
||||
{% else %}
|
||||
|
Reference in New Issue
Block a user