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:
Arun Babu Neelicattu 2018-05-08 14:32:39 +12:00 committed by ansibot
commit eb430b2e57
2 changed files with 26 additions and 2 deletions

View file

@ -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 }}"