diff --git a/changelogs/fragments/49981-filter-dnsimple-request-by-record-name.yaml b/changelogs/fragments/49981-filter-dnsimple-request-by-record-name.yaml new file mode 100644 index 00000000000..9a9ec50460e --- /dev/null +++ b/changelogs/fragments/49981-filter-dnsimple-request-by-record-name.yaml @@ -0,0 +1,2 @@ +bugfixes: + - fix DNSimple to ensure check works even when the number of records is larger than 100 diff --git a/lib/ansible/modules/net_tools/dnsimple.py b/lib/ansible/modules/net_tools/dnsimple.py index 4538c1f9edb..fd19a908bd2 100644 --- a/lib/ansible/modules/net_tools/dnsimple.py +++ b/lib/ansible/modules/net_tools/dnsimple.py @@ -236,7 +236,7 @@ def main(): # need the not none check since record could be an empty string if domain and record is not None: - records = [r['record'] for r in client.records(str(domain))] + records = [r['record'] for r in client.records(str(domain), params={'name': record})] if not record_type: module.fail_json(msg="Missing the record type")