bundles/apt: remove cloud-init if found on node

This commit is contained in:
Franzi 2020-06-06 10:26:05 +02:00
parent 7c53a13483
commit 507e28bc24
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -69,3 +69,26 @@ for key in gpg_keys:
if node.metadata.get('apt', {}).get('packages', {}):
for package, options in node.metadata['apt']['packages'].items():
pkg_apt[package] = options
if node.metadata.get('keep_cloud_init', False):
pkg_apt['cloud-init'] = {
'installed': True,
}
else:
pkg_apt['cloud-init'] = {
'installed': False,
}
pkg_apt['netplan.io'] = {
'installed': False,
}
files['/etc/cloud'] = {
'delete': True,
}
files['/etc/netplan'] = {
'delete': True,
}
files['/var/lib/cloud'] = {
'delete': True,
}