1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/community/cloud-init/04-set-default-datasource-list.patch

30 lines
1.3 KiB
Diff

From: Dermot Bradley <dermot_bradley@yahoo.com>
Date: Sat, 28 Jan 2023 14:24 +0000
Subject: [PATCH] cloud-init: Set default datasource list
When no DataSources list is specified then the automatically used default
list of (all) Data Sources includes "CloudSigma" and "SmartOS" which
require the py3-pyserial package to be installed (which is *not* listed
as a dependancy of the Alpine cloud-init package) and, if/when not
installed, then during boot cloud-init gives multiple errors when
checking those DataSources.
Add a replacement "default" list of DataSources to /etc/cloud.cfg that
includes all except CloudSigma and SmartOS, so avoiding errors when
someone has not tailored the DataSources list.
---
diff -aur a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
--- a/config/cloud.cfg.tmpl
+++ b/config/cloud.cfg.tmpl
@@ -87,6 +87,9 @@
# If you use datasource_list array, keep array items in a single line.
# If you use multi line array, ds-identify script won't read array items.
+{% if variant == "alpine" %}
+datasource_list: ['NoCloud', 'ConfigDrive', 'LXD', 'OpenNebula', 'Azure', 'AltCloud', 'OVF', 'MAAS', 'GCE', 'OpenStack', 'AliYun', 'Vultr', 'Ec2', 'CloudStack', 'Bigstep', 'Scaleway', 'Hetzner', 'IBMCloud', 'Oracle', 'Exoscale', 'RbxCloud', 'UpCloud', 'VMware', 'NWCS', 'Akamai', 'None']
+{% endif %}
# Example datasource config
# datasource:
# Ec2: