mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00

GCE also gets its own file. For now, this scales - but we might want to refactor when there is more that just the kernel package we need to choose from
18 lines
664 B
Python
18 lines
664 B
Python
from bootstrapvz.base import Task
|
|
from bootstrapvz.common import phases
|
|
from bootstrapvz.common.tasks import apt
|
|
|
|
|
|
class DefaultPackages(Task):
|
|
description = 'Adding image packages required for kvm'
|
|
phase = phases.preparation
|
|
predecessors = [apt.AddDefaultSources]
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
import os.path
|
|
kernel_packages_path = os.path.join(os.path.dirname(__file__), 'packages-kernels.yml')
|
|
from bootstrapvz.common.tools import config_get
|
|
kernel_package = config_get(kernel_packages_path, [info.release_codename,
|
|
info.manifest.system['architecture']])
|
|
info.packages.add(kernel_package)
|