bundles/apt: remove cloud-init if found on node
This commit is contained in:
parent
7c53a13483
commit
507e28bc24
1 changed files with 23 additions and 0 deletions
|
@ -69,3 +69,26 @@ for key in gpg_keys:
|
||||||
if node.metadata.get('apt', {}).get('packages', {}):
|
if node.metadata.get('apt', {}).get('packages', {}):
|
||||||
for package, options in node.metadata['apt']['packages'].items():
|
for package, options in node.metadata['apt']['packages'].items():
|
||||||
pkg_apt[package] = options
|
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,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue