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

I couldn't be bothered to untangle this, so here it goes: * Log colors depending on loglevel * Simplified Filelogger * Remove description=None from basetask * create_list creates task list from argument now * Task rollback feature: If a task fails, the tasklist calls rollback() on the completed tasks in reverse order * Added TaskException to common.exceptions as a base to extend from * Added TriggerRollback task to common.tasks for development purposes * An EBS volume for bootstrapping is now created and attached to the instance (including rollback actions) * EC2 Connect task now depends on host.GetInfo
15 lines
516 B
Python
15 lines
516 B
Python
from manifest import Manifest
|
|
|
|
|
|
def tasks(tasklist, manifest):
|
|
from tasks import packages
|
|
from tasks import connection
|
|
from tasks import host
|
|
from tasks import ebs
|
|
tasklist.add(packages.HostPackages(), packages.ImagePackages(), host.CheckPackages(),
|
|
connection.GetCredentials(), host.GetInfo(), connection.Connect())
|
|
if manifest.volume['backing'].lower() == 'ebs':
|
|
tasklist.add(ebs.CreateVolume(), ebs.AttachVolume())
|
|
|
|
from common.tasks import TriggerRollback
|
|
tasklist.add(TriggerRollback())
|