-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure_rm_dnsrecordset.yml
93 lines (79 loc) · 2.44 KB
/
azure_rm_dnsrecordset.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
----
- name: demonstrate azure_rm_dnsrecordset TXT record issue
hosts: localhost
connection: local
gather_facts: False
vars:
az_resource_group: Testing
az_location: ukwest
az_dnszone: 'test.uk'
tasks:
- name: create resource group
azure_rm_resourcegroup:
name: "{{ az_resource_group }}"
location: "{{ az_location }}"
state: present
register: azure_resourcegroup
- name: create a DNS zone
azure_rm_dnszone:
resource_group: "{{ az_resource_group }}"
name: "{{ az_dnszone }}"
state: present
- name: ensure an "A" record set with multiple records
azure_rm_dnsrecordset:
resource_group: "{{ az_resource_group }}"
relative_name: www
zone_name: "{{ az_dnszone }}"
record_type: A
state: present
records:
- entry: 192.168.100.101
- entry: 192.168.100.102
- entry: 192.168.100.103
- name: create TXT record in a new record set
azure_rm_dnsrecordset:
resource_group: "{{ az_resource_group }}"
relative_name: "mail.{{ az_dnszone }}"
zone_name: "{{ az_dnszone }}"
record_type: TXT
records:
- entry: 'v=spf1 a -all'--
- name: demonstrate azure_rm_dnsrecordset TXT record issue
hosts: localhost
connection: local
gather_facts: False
vars:
az_resource_group: Testing
az_location: ukwest
az_dnszone: 'test.uk'
tasks:
- name: create resource group
azure_rm_resourcegroup:
name: "{{ az_resource_group }}"
location: "{{ az_location }}"
state: present
register: azure_resourcegroup
- name: create a DNS zone
azure_rm_dnszone:
resource_group: "{{ az_resource_group }}"
name: "{{ az_dnszone }}"
state: present
- name: ensure an "A" record set with multiple records
azure_rm_dnsrecordset:
resource_group: "{{ az_resource_group }}"
relative_name: www
zone_name: "{{ az_dnszone }}"
record_type: A
state: present
records:
- entry: 192.168.100.101
- entry: 192.168.100.102
- entry: 192.168.100.103
- name: create TXT record in a new record set
azure_rm_dnsrecordset:
resource_group: "{{ az_resource_group }}"
relative_name: "mail.{{ az_dnszone }}"
zone_name: "{{ az_dnszone }}"
record_type: TXT
records:
- entry: 'v=spf1 a -all'