summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-09-15 17:05:20 +0300
committerzsdc <taras@vyos.io>2020-09-15 17:05:20 +0300
commit7cd260b313267dc7123cb99a75d4555e24909cca (patch)
treef57f3db085a724df237ffa64b589c6bb6dd3b28f /config
parent1a790ee102fd405e5c3a20a17a69ba0c118ed874 (diff)
parent948bd9c1fcd08346cf8ec0551d7f6c2b234e896b (diff)
downloadvyos-cloud-init-7cd260b313267dc7123cb99a75d4555e24909cca.tar.gz
vyos-cloud-init-7cd260b313267dc7123cb99a75d4555e24909cca.zip
T2117: Cloud-init updated to 20.3
Merged with 20.3 tag from the upstream Cloud-init repository
Diffstat (limited to 'config')
-rw-r--r--config/cloud.cfg.d/05_logging.cfg2
-rw-r--r--config/cloud.cfg.tmpl60
2 files changed, 51 insertions, 11 deletions
diff --git a/config/cloud.cfg.d/05_logging.cfg b/config/cloud.cfg.d/05_logging.cfg
index 937b07f8..bf917a95 100644
--- a/config/cloud.cfg.d/05_logging.cfg
+++ b/config/cloud.cfg.d/05_logging.cfg
@@ -44,7 +44,7 @@ _log:
class=FileHandler
level=DEBUG
formatter=arg0Formatter
- args=('/var/log/cloud-init.log',)
+ args=('/var/log/cloud-init.log', 'a', 'UTF-8')
- &log_syslog |
[handler_cloudLogHandler]
class=handlers.SysLogHandler
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
index 99f96ea1..2beb9b0c 100644
--- a/config/cloud.cfg.tmpl
+++ b/config/cloud.cfg.tmpl
@@ -2,7 +2,7 @@
# The top level settings are used as module
# and system configuration.
-{% if variant in ["freebsd"] %}
+{% if variant.endswith("bsd") %}
syslog_fix_perms: root:wheel
{% elif variant in ["suse"] %}
syslog_fix_perms: root:root
@@ -21,7 +21,7 @@ disable_root: false
disable_root: true
{% endif %}
-{% if variant in ["amazon", "centos", "fedora", "rhel"] %}
+{% if variant in ["alpine", "amazon", "centos", "fedora", "rhel"] %}
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
{% if variant == "amazon" %}
resize_rootfs: noblock
@@ -33,7 +33,7 @@ ssh_pwauth: 0
# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: false
-{% if variant in ["freebsd"] %}
+{% if variant.endswith("bsd") %}
# 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']
@@ -55,19 +55,26 @@ network:
# The modules that run in the 'init' stage
cloud_init_modules:
- migrator
+{% if variant not in ["netbsd"] %}
- seed_random
+{% endif %}
- bootcmd
- write-files
+{% if variant not in ["netbsd"] %}
- growpart
- resizefs
-{% if variant not in ["freebsd"] %}
+{% endif %}
+{% if variant not in ["freebsd", "netbsd"] %}
- disk_setup
- mounts
{% endif %}
- set_hostname
- update_hostname
-{% if variant not in ["freebsd"] %}
- update_etc_hosts
+{% if variant in ["alpine"] %}
+ - resolv_conf
+{% endif %}
+{% if not variant.endswith("bsd") %}
- ca-certs
- rsyslog
{% endif %}
@@ -100,7 +107,10 @@ cloud_config_modules:
{% if variant in ["suse"] %}
- zypper-add-repo
{% endif %}
-{% if variant not in ["freebsd"] %}
+{% if variant in ["alpine"] %}
+ - apk-configure
+{% endif %}
+{% if variant not in ["freebsd", "netbsd"] %}
- ntp
{% endif %}
- timezone
@@ -121,11 +131,9 @@ cloud_final_modules:
{% if variant in ["ubuntu", "unknown"] %}
- ubuntu-drivers
{% endif %}
-{% if variant not in ["freebsd"] %}
- puppet
- chef
- mcollective
-{% endif %}
- salt-minion
- rightscale_userdata
- scripts-vendor
@@ -143,7 +151,9 @@ cloud_final_modules:
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
-{% if variant in ["amazon", "arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", "ubuntu"] %}
+{% if variant in ["alpine", "amazon", "arch", "centos", "debian",
+ "fedora", "freebsd", "netbsd", "openbsd", "rhel",
+ "suse", "ubuntu"] %}
distro: {{ variant }}
{% else %}
# Unknown/fallback distro.
@@ -158,6 +168,9 @@ system_info:
groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
+{# SRU_BLOCKER: do not ship network renderers on Xenial, Bionic or Eoan #}
+ network:
+ renderers: ['netplan', 'eni', 'sysconfig']
# Automatically discover the best ntp_client
ntp_client: auto
# Other config here will be given to the distro class and/or path classes
@@ -191,7 +204,8 @@ system_info:
primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports
ssh_svcname: ssh
-{% elif variant in ["amazon", "arch", "centos", "fedora", "rhel", "suse"] %}
+{% elif variant in ["alpine", "amazon", "arch", "centos", "fedora",
+ "rhel", "suse"] %}
# Default user name + that default users groups (if added/used)
default_user:
{% if variant == "amazon" %}
@@ -205,13 +219,19 @@ system_info:
{% endif %}
{% if variant == "suse" %}
groups: [cdrom, users]
+{% elif variant == "alpine" %}
+ groups: [adm, sudo]
{% elif variant == "arch" %}
groups: [wheel, users]
{% else %}
groups: [wheel, adm, systemd-journal]
{% endif %}
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
+{% if variant == "alpine" %}
+ shell: /bin/ash
+{% else %}
shell: /bin/bash
+{% endif %}
# Other config here will be given to the distro class and/or path classes
paths:
cloud_dir: /var/lib/cloud/
@@ -226,4 +246,24 @@ system_info:
groups: [wheel]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/tcsh
+{% elif variant in ["netbsd"] %}
+ default_user:
+ name: netbsd
+ lock_passwd: True
+ gecos: NetBSD
+ groups: [wheel]
+ sudo: ["ALL=(ALL) NOPASSWD:ALL"]
+ shell: /bin/sh
+{% elif variant in ["openbsd"] %}
+ default_user:
+ name: openbsd
+ lock_passwd: True
+ gecos: OpenBSD
+ groups: [wheel]
+ sudo: ["ALL=(ALL) NOPASSWD:ALL"]
+ shell: /bin/ksh
+{% endif %}
+{% if variant in ["freebsd", "netbsd", "openbsd"] %}
+ network:
+ renderers: ['{{ variant }}']
{% endif %}