blob: 2f2420464ad11c13142f3538f075a7d1f8721295 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
---
dns_records_add:
- view: private
zone: {{ dns_domain }}
entries:
{% for mst in groups['masters'] %}
- type: A
hostname: {{ hostvars[mst]['ansible_hostname'] }}
ip: {{ hostvars[mst]['dns_private_ip'] }}
{% endfor %}
{% for node in groups['nodes'] %}
- type: A
hostname: {{ hostvars[node]['ansible_hostname'] }}
ip: {{ hostvars[node]['dns_private_ip'] }}
{% endfor %}
- view: public
zone: {{ dns_domain}}
entries:
{% for mst in groups['masters']%}
- type: A
hostname: {{ hostvars[mst]['ansible_hostname'] }}
ip: {{ hostvars[mst]['dns_public_ip'] }}
{% endfor %}
{% for node in groups['nodes'] %}
- type: A
hostname: {{ hostvars[node]['ansible_hostname'] }}
ip: {{ hostvars[node]['dns_public_ip'] }}
{% endfor %}
|