-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathcreate-azure.yml
43 lines (41 loc) · 1.17 KB
/
create-azure.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
- name: Create DNS record at Azure
azure_rm_dnsrecordset:
client_id: "{{ azure_client_id }}"
secret: "{{ azure_secret }}"
subscription_id: "{{ azure_subscription_id }}"
tenant: "{{ azure_tenant }}"
time_to_live: 120
resource_group: "{{ azure_resource_group }}"
relative_name: "{{ item }}.{{ cluster_name }}"
zone_name: "{{ public_domain }}"
record_type: A
records:
- entry: "{{ pd_public_ip }}"
state: present
with_items:
- api
- '*.apps'
tags:
- public_dns
when: (pd_public_ip is defined) and (pd_public_ip|length > 0)
- name: Create IPv6 DNS record at Azure
azure_rm_dnsrecordset:
client_id: "{{ azure_client_id }}"
secret: "{{ azure_secret }}"
subscription_id: "{{ azure_subscription_id }}"
tenant: "{{ azure_tenant }}"
time_to_live: 120
resource_group: "{{ azure_resource_group }}"
relative_name: "{{ item }}.{{ cluster_name }}"
zone_name: "{{ public_domain }}"
record_type: AAAA
records:
- entry: "{{ pd_public_ipv6 }}"
state: present
with_items:
- api
- '*.apps'
tags:
- public_dns
when: (pd_public_ipv6 is defined) and (pd_public_ipv6|length > 0)