test: to be rebased
This commit is contained in:
@@ -11,8 +11,13 @@
|
|||||||
dns_serial: "{{ ansible_date_time.epoch }}"
|
dns_serial: "{{ ansible_date_time.epoch }}"
|
||||||
web_hostname_block: |-
|
web_hostname_block: |-
|
||||||
{% for webserver in groups['webservers'] | sort -%}
|
{% for webserver in groups['webservers'] | sort -%}
|
||||||
{% for web_hostname in (hostvars[webserver]['web_hostname'] | selectattr('host', 'match', '.+' ~ item.name) | sort(attribute='host')) -%}
|
{% for web_hostname in (hostvars[webserver]['web_hostname'] | selectattr('host', 'match', item.name) | map(attribute='host') | sort) -%}
|
||||||
{{ web_hostname.host | regex_replace('\.' ~ item.name ~ '$', '') }} IN CNAME {{ hostvars[webserver].ansible_host }}.
|
{% if web_hostname | match((\S+\.){2}) %}
|
||||||
|
@ IN A {{ global_public_ip_address }}
|
||||||
|
@ IN AAAA {{ hostvars[webserver].proxmox_net0.ip6 | default(hostvars[webserver].ansible_default_ipv4.address) | ansible.utils.ipaddr('address') }}
|
||||||
|
{% else %}
|
||||||
|
{{ web_hostname | regex_replace('\.' ~ item.name ~ '$', '') }} IN CNAME {{ webserver }}.
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user