mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Filter DNSimple request by record name. (#49981)
* Filter DNSimple request by record name. The request was not filtered and DNSimple returns only the first 100 records so if the number of records is larger the check could fail. This patch fixes the issue and also makes the check to perform better. * Add changelog fragment.
This commit is contained in:
parent
b0fc2a2103
commit
e0274adafe
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- fix DNSimple to ensure check works even when the number of records is larger than 100
|
|
@ -239,7 +239,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")
|
||||
|
|
Loading…
Reference in a new issue