nsupdate: Don't try fixing non-existing TXT values (#63408)
The commit 4e895c1
aimed to ensure that TXT record values were sanely
quoted. Sadly it failed to take the scenario of non-existing values
into account. While record values are required for record creation
they are not required for record deletion.
This change rectifies that oversight, saving Ansible from
unsuccessfully trying to operate on NoneType objects.
Resolves #63364
This commit is contained in:
parent
332b220854
commit
98b025239a
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- nsupdate - Do not try fixing non-existing TXT values (https://github.com/ansible/ansible/issues/63364)
|
|
@ -232,7 +232,7 @@ class RecordManager(object):
|
|||
else:
|
||||
self.algorithm = module.params['key_algorithm']
|
||||
|
||||
if self.module.params['type'].lower() == 'txt':
|
||||
if self.module.params['type'].lower() == 'txt' and self.module.params['value'] is not None:
|
||||
self.value = list(map(self.txt_helper, self.module.params['value']))
|
||||
else:
|
||||
self.value = self.module.params['value']
|
||||
|
|
Loading…
Reference in a new issue