summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzdc <zdc@users.noreply.github.com>2023-01-27 17:08:20 +0200
committerGitHub <noreply@github.com>2023-01-27 17:08:20 +0200
commit330c88b626b92533f2812c2f1628777623ac2922 (patch)
treeac41c29add3692e161dda8780f01da4e8034bcd7
parentfc0b314b8ea1700def3c3405725cff8af7983659 (diff)
parentb3812dff44916393c74cba2f2b3e68990d3912df (diff)
downloadvyos-cloud-init-330c88b626b92533f2812c2f1628777623ac2922.tar.gz
vyos-cloud-init-330c88b626b92533f2812c2f1628777623ac2922.zip
Merge pull request #59 from zdc/T4954-sagitta
network-config: T4954: Fixed DNS settings
-rw-r--r--cloudinit/config/cc_vyos.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index 08d0d87e..ffffe0b0 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -442,6 +442,10 @@ def set_config_interfaces_v1(config, iface_config: dict):
# configure nameservers
if iface_config['type'] == 'nameserver':
+ # convert a string to list with a single item if necessary
+ if isinstance(iface_config['address'], str):
+ iface_config['address'] = [iface_config['address']]
+
for item in iface_config['address']:
set_name_server(config, item)