mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Easier overview of tasks being added
This commit is contained in:
parent
110ec638c1
commit
5dc00d920c
2 changed files with 19 additions and 12 deletions
|
@ -65,6 +65,7 @@ def tasks(tasklist, manifest):
|
||||||
apt.AptClean(),
|
apt.AptClean(),
|
||||||
apt.EnableDaemonAutostart(),
|
apt.EnableDaemonAutostart(),
|
||||||
filesystem.UnmountSpecials(),
|
filesystem.UnmountSpecials(),
|
||||||
|
|
||||||
filesystem.UnmountVolume(),
|
filesystem.UnmountVolume(),
|
||||||
filesystem.DeleteMountDir(),
|
filesystem.DeleteMountDir(),
|
||||||
ami.RegisterAMI())
|
ami.RegisterAMI())
|
||||||
|
|
|
@ -22,19 +22,16 @@ def initialize():
|
||||||
def tasks(tasklist, manifest):
|
def tasks(tasklist, manifest):
|
||||||
tasklist.add(packages.HostPackages(),
|
tasklist.add(packages.HostPackages(),
|
||||||
packages.ImagePackages(),
|
packages.ImagePackages(),
|
||||||
host.CheckPackages())
|
host.CheckPackages(),
|
||||||
tasklist.add(filesystem.FormatVolume())
|
|
||||||
if manifest.volume['filesystem'].lower() == 'xfs':
|
filesystem.FormatVolume(),
|
||||||
tasklist.add(common_filesystem.AddXFSProgs())
|
common_filesystem.CreateMountDir(),
|
||||||
if manifest.volume['filesystem'].lower() in ['ext2', 'ext3', 'ext4']:
|
filesystem.MountVolume(),
|
||||||
tasklist.add(filesystem.TuneVolumeFS())
|
|
||||||
tasklist.add(common_filesystem.CreateMountDir(),
|
bootstrap.Bootstrap(),
|
||||||
filesystem.MountVolume())
|
|
||||||
if manifest.bootstrapper['tarball']:
|
|
||||||
tasklist.add(bootstrap.MakeTarball())
|
|
||||||
tasklist.add(bootstrap.Bootstrap(),
|
|
||||||
common_filesystem.MountSpecials(),
|
common_filesystem.MountSpecials(),
|
||||||
locale.GenerateLocale(),
|
locale.GenerateLocale(),
|
||||||
|
context.OpenNebulaContext(),
|
||||||
locale.SetTimezone(),
|
locale.SetTimezone(),
|
||||||
apt.DisableDaemonAutostart(),
|
apt.DisableDaemonAutostart(),
|
||||||
apt.AptSources(),
|
apt.AptSources(),
|
||||||
|
@ -60,9 +57,18 @@ def tasks(tasklist, manifest):
|
||||||
apt.AptClean(),
|
apt.AptClean(),
|
||||||
apt.EnableDaemonAutostart(),
|
apt.EnableDaemonAutostart(),
|
||||||
common_filesystem.UnmountSpecials(),
|
common_filesystem.UnmountSpecials(),
|
||||||
|
|
||||||
filesystem.UnmountVolume(),
|
filesystem.UnmountVolume(),
|
||||||
common_filesystem.DeleteMountDir())
|
common_filesystem.DeleteMountDir())
|
||||||
tasklist.add(context.OpenNebulaContext())
|
|
||||||
|
if manifest.bootstrapper['tarball']:
|
||||||
|
tasklist.add(bootstrap.MakeTarball())
|
||||||
|
|
||||||
|
filesystem_specific_tasks = {'xfs': [filesystem.AddXFSProgs()],
|
||||||
|
'ext2': [filesystem.TuneVolumeFS()],
|
||||||
|
'ext3': [filesystem.TuneVolumeFS()],
|
||||||
|
'ext4': [filesystem.TuneVolumeFS()]}
|
||||||
|
tasklist.add(*filesystem_specific_tasks.get(manifest.volume['filesystem'].lower()))
|
||||||
|
|
||||||
|
|
||||||
def rollback_tasks(tasklist, tasks_completed, manifest):
|
def rollback_tasks(tasklist, tasks_completed, manifest):
|
||||||
|
|
Loading…
Add table
Reference in a new issue