diff options
author | Christian Breunig <christian@breunig.cc> | 2023-01-28 07:51:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 07:51:35 +0100 |
commit | 8cf8051edd8bf903954f788217210ed977ec1e09 (patch) | |
tree | 13f795edb370a04295900709f2a272c41e725d4f /cloudinit/config/cc_vyos.py | |
parent | d8bc4f5a18864ae324b2963525828fa0270c52b4 (diff) | |
parent | f1cf5759886bd4ffe6551c4cd09584671918a075 (diff) | |
download | vyos-cloud-init-8cf8051edd8bf903954f788217210ed977ec1e09.tar.gz vyos-cloud-init-8cf8051edd8bf903954f788217210ed977ec1e09.zip |
Merge pull request #60 from zdc/T4954-equuleus
network-config: T4954: Fixed DNS settings
Diffstat (limited to 'cloudinit/config/cc_vyos.py')
-rw-r--r-- | cloudinit/config/cc_vyos.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index 408a2ea9..dd95a245 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -323,6 +323,10 @@ def set_config_interfaces_v1(config, iface_config): # 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']: logger.debug("Configuring DNS nameserver: {}".format(item)) config.set(['system', 'name-server'], value=item, replace=False) |