mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07: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:
parent
f7fe6a065e
commit
8a9865cb10
3 changed files with 45 additions and 1 deletions
|
@ -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']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue