summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_vyos.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/config/cc_vyos.py')
-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)