Skip to content

Commit

Permalink
azure_rm_dnsrecordset: fix updating SOA record (#1052)
Browse files Browse the repository at this point in the history
* fix updating SOA record

* remove comments

* add example

* fix example
  • Loading branch information
akira6592 authored Jan 12, 2023
1 parent ff0cc74 commit 7965032
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
25 changes: 20 additions & 5 deletions plugins/modules/azure_rm_dnsrecordset.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,21 @@
records:
- entry: 'v=spf1 a -all'
- name: Update SOA record
azure_rm_dnsrecordset:
resource_group: myResourceGroup
relative_name: "@"
zone_name: testing.com
record_type: SOA
records:
- host: ns1-99.example.com.
email: azuredns-hostmaster99.example.com
serial_number: 99
refresh_time: 3699
retry_time: 399
expire_time: 2419299
minimum_ttl: 399
'''

RETURN = '''
Expand Down Expand Up @@ -309,11 +324,11 @@
SOA=dict(
host=dict(type='str', aliases=['entry']),
email=dict(type='str'),
serial_number=dict(type='long'),
refresh_time=dict(type='long'),
retry_time=dict(type='long'),
expire_time=dict(type='long'),
minimum_ttl=dict(type='long')
serial_number=dict(type='int'),
refresh_time=dict(type='int'),
retry_time=dict(type='int'),
expire_time=dict(type='int'),
minimum_ttl=dict(type='int')
),
CAA=dict(
value=dict(type='str', aliases=['entry']),
Expand Down
22 changes: 22 additions & 0 deletions tests/integration/targets/azure_rm_dnsrecordset/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,28 @@
that:
- results.changed

- name: Update SOA record
azure_rm_dnsrecordset:
resource_group: "{{ resource_group }}"
relative_name: "@"
zone_name: "{{ domain_name }}.com"
record_type: SOA
state: present
records:
- host: ns1-99.example.com.
email: azuredns-hostmaster99.example.com
serial_number: 99
refresh_time: 3699
retry_time: 399
expire_time: 2419299
minimum_ttl: 399
register: results

- name: Assert that SOA record set was created
assert:
that:
- results.changed

- name: Delete DNS zone
azure_rm_dnszone:
resource_group: "{{ resource_group }}"
Expand Down

0 comments on commit 7965032

Please sign in to comment.