mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 23:21:22 -07:00
azure: fix creation of TXT dns record sets (#38368)
As per `azure.mgmt.dns.models.txt_record.TxtRecord`, expected value for a record is of type `[str]`. Fix TXT argspec to specify type as `list` instead of `str`. Fixes #37581 Reference: https://docs.microsoft.com/en-us/python/api/azure.mgmt.dns.models.txtrecord?view=azure-python
This commit is contained in:
parent
8c27ffdf90
commit
eb430b2e57
2 changed files with 26 additions and 2 deletions
|
@ -158,6 +158,26 @@
|
|||
that:
|
||||
- results.changed
|
||||
|
||||
- name: create TXT records in a new record set
|
||||
azure_rm_dnsrecordset:
|
||||
resource_group: "{{ resource_group }}"
|
||||
relative_name: "_txt.{{ domain_name }}.com"
|
||||
zone_name: "{{ domain_name }}.com"
|
||||
record_type: TXT
|
||||
state: present
|
||||
records:
|
||||
- entry: "v=spf1 a -all"
|
||||
- entry: "foo"
|
||||
- entry:
|
||||
- "bar"
|
||||
- "baz"
|
||||
register: results
|
||||
|
||||
- name: Assert that TXT record set was created
|
||||
assert:
|
||||
that:
|
||||
- results.changed
|
||||
|
||||
- name: Delete DNS zone
|
||||
azure_rm_dnszone:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue