mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix for dns4 empty setting (#30757)
This fix check if DNS4 is None or not before proceeding with other operations. Also, added unit test for this change. Signed-off-by: Fedor Sumkin <qosys.net@gmail.com> Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
committed by
Abhijeet Kasurde
parent
f7fe6a065e
commit
8a9865cb10
@@ -556,7 +556,7 @@ class Nmcli(object):
|
||||
self.type = module.params['type']
|
||||
self.ip4 = module.params['ip4']
|
||||
self.gw4 = module.params['gw4']
|
||||
self.dns4 = ' '.join(module.params['dns4'])
|
||||
self.dns4 = ' '.join(module.params['dns4']) if module.params.get('dns4') else None
|
||||
self.ip6 = module.params['ip6']
|
||||
self.gw6 = module.params['gw6']
|
||||
self.dns6 = module.params['dns6']
|
||||
|
||||
Reference in New Issue
Block a user