summaryrefslogtreecommitdiff
path: root/config/cloud.cfg.tmpl
diff options
context:
space:
mode:
authorsshedi <53473811+sshedi@users.noreply.github.com>2021-07-23 21:10:41 +0530
committerGitHub <noreply@github.com>2021-07-23 10:40:41 -0500
commit6e7066ea2b06940c4931f0258c7982b09966582f (patch)
tree6b960749538b4544b88a83c33253c5703efc430f /config/cloud.cfg.tmpl
parent4257e30ac4b8730af35c078f2df0a2234dd19ffa (diff)
downloadvyos-cloud-init-6e7066ea2b06940c4931f0258c7982b09966582f.tar.gz
vyos-cloud-init-6e7066ea2b06940c4931f0258c7982b09966582f.zip
Add ability to manage fallback network config on PhotonOS (#941)
Currently cloud-init generates fallback network config on various scenarios. For example: 1. When no DS found 2. There is no 'network' info given in DS metadata. 3. If a DS gives a network config once and upon reboot if DS doesn't give any network info, previously set network data will be overridden. A newly introduced key in cloud.cfg.tmpl can be used to control this behavior on PhotonOS. Also, if OS comes with a set of default network files(configs), like in PhotonOS, cloud-init should not overwrite them by default. This change also includes some nitpicking changes of reorganizing few config variables. Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Diffstat (limited to 'config/cloud.cfg.tmpl')
-rw-r--r--config/cloud.cfg.tmpl10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
index f918d919..2314d893 100644
--- a/config/cloud.cfg.tmpl
+++ b/config/cloud.cfg.tmpl
@@ -18,9 +18,10 @@ users:
- default
{% endif %}
-# VMware guest customization.
{% if variant in ["photon"] %}
+# VMware guest customization.
disable_vmware_customization: true
+manage_etc_hosts: false
{% endif %}
# If this is set, 'root' will not be able to ssh in and they
@@ -306,10 +307,15 @@ system_info:
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
+ network:
+ renderers: ['networkd']
ssh_svcname: sshd
-#manage_etc_hosts: true
+ # If set to true, cloud-init will not use fallback network config.
+ # In Photon, we have default network settings, hence if network settings are
+ # not explicitly given in metadata, don't use fallback network config.
+ disable_fallback_netcfg: true
{% endif %}
{% if variant in ["freebsd", "netbsd", "openbsd"] %}
network: