mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00

Lines removed: over 500. Readiblity gained: A shitload Now you can actually get an overview of a manifest on a single screen height. I am sure that it will also save a lot of hassle when modifying schema in the future. No more "expected property name" etc. because of an extraneous comma Comments are of course natively support, so there's no need for this minify_json hokey pokey
28 lines
990 B
Python
28 lines
990 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 EC2'
|
|
phase = phases.preparation
|
|
predecessors = [apt.AddDefaultSources]
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
info.packages.add('file') # Needed for the init scripts
|
|
# isc-dhcp-client doesn't work properly with ec2
|
|
if info.release_codename in {'jessie', 'sid'}:
|
|
info.packages.add('dhcpcd5')
|
|
else:
|
|
info.packages.add('dhcpcd')
|
|
|
|
info.exclude_packages.add('isc-dhcp-client')
|
|
info.exclude_packages.add('isc-dhcp-common')
|
|
|
|
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)
|