summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorsshedi <53473811+sshedi@users.noreply.github.com>2021-06-18 22:23:44 +0530
committerGitHub <noreply@github.com>2021-06-18 11:53:44 -0500
commit35aa9db6f8e2ba05d366776c0e8d97f52217e930 (patch)
treee3c14005ed078aea1cc0425ec8bea3db9f16602e /config
parentf5a244960c3f1591d022c081d816bc9604512629 (diff)
downloadvyos-cloud-init-35aa9db6f8e2ba05d366776c0e8d97f52217e930.tar.gz
vyos-cloud-init-35aa9db6f8e2ba05d366776c0e8d97f52217e930.zip
Add support for VMware PhotonOS (#909)
Also added a new (currently experimental) systemd-networkd renderer, and includes a small refactor to cc_resolv_conf.py to support the resolved.conf used by systemd-resolved.
Diffstat (limited to 'config')
-rw-r--r--config/cloud.cfg.tmpl52
1 files changed, 47 insertions, 5 deletions
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
index 586384e4..d6dbb833 100644
--- a/config/cloud.cfg.tmpl
+++ b/config/cloud.cfg.tmpl
@@ -11,11 +11,21 @@ syslog_fix_perms: root:root
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
+{% if variant in ["photon"] %}
+ - name: root
+ lock_passwd: false
+{% else %}
- default
+{% endif %}
+
+# VMware guest customization.
+{% if variant in ["photon"] %}
+disable_vmware_customization: true
+{% endif %}
# If this is set, 'root' will not be able to ssh in and they
# will get a message to login instead as the default $user
-{% if variant in ["freebsd"] %}
+{% if variant in ["freebsd", "photon"] %}
disable_root: false
{% else %}
disable_root: true
@@ -38,6 +48,16 @@ preserve_hostname: false
# This should not be required, but leave it in place until the real cause of
# not finding -any- datasources is resolved.
datasource_list: ['NoCloud', 'ConfigDrive', 'Azure', 'OpenStack', 'Ec2']
+{% elif variant in ["photon"] %}
+# Datasources to check for cloud-config
+datasource_list: [
+ NoCloud,
+ ConfigDrive,
+ OVF,
+ OpenStack,
+ VMwareGuestInfo,
+ None
+ ]
{% endif %}
# Example datasource config
# datasource:
@@ -72,11 +92,13 @@ cloud_init_modules:
- set_hostname
- update_hostname
- update_etc_hosts
-{% if variant in ["alpine"] %}
+{% if variant in ["alpine", "photon"] %}
- resolv_conf
{% endif %}
{% if not variant.endswith("bsd") %}
+{% if variant not in ["photon"] %}
- ca-certs
+{% endif %}
- rsyslog
{% endif %}
- users-groups
@@ -90,11 +112,15 @@ cloud_config_modules:
- emit_upstart
- snap
{% endif %}
+{% if variant not in ["photon"] %}
- ssh-import-id
- locale
+{% endif %}
- set-passwords
-{% if variant in ["rhel", "fedora"] %}
+{% if variant in ["rhel", "fedora", "photon"] %}
+{% if variant not in ["photon"] %}
- spacewalk
+{% endif %}
- yum-add-repo
{% endif %}
{% if variant in ["ubuntu", "unknown", "debian"] %}
@@ -155,8 +181,8 @@ cloud_final_modules:
system_info:
# This will affect which distro class gets used
{% if variant in ["almalinux", "alpine", "amazon", "arch", "centos", "debian",
- "fedora", "freebsd", "netbsd", "openbsd", "rhel", "rocky",
- "suse", "ubuntu"] %}
+ "fedora", "freebsd", "netbsd", "openbsd", "photon", "rhel",
+ "rocky", "suse", "ubuntu"] %}
distro: {{ variant }}
{% elif variant in ["dragonfly"] %}
distro: dragonflybsd
@@ -276,6 +302,22 @@ system_info:
groups: [wheel]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/ksh
+{% elif variant == "photon" %}
+ default_user:
+ name: photon
+ lock_passwd: True
+ gecos: PhotonOS
+ groups: [wheel]
+ sudo: ["ALL=(ALL) NOPASSWD:ALL"]
+ shell: /bin/bash
+ # Other config here will be given to the distro class and/or path classes
+ paths:
+ cloud_dir: /var/lib/cloud/
+ templates_dir: /etc/cloud/templates/
+
+ ssh_svcname: sshd
+
+#manage_etc_hosts: true
{% endif %}
{% if variant in ["freebsd", "netbsd", "openbsd"] %}
network: