2014-01-09 19:02:46 +01:00
|
|
|
import tasks
|
|
|
|
|
|
|
|
|
|
|
|
def validate_manifest(data, validator, error):
|
|
|
|
import os.path
|
2014-07-05 20:01:20 +02:00
|
|
|
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
2014-01-09 19:02:46 +01:00
|
|
|
validator(data, schema_path)
|
|
|
|
|
|
|
|
|
|
|
|
def resolve_tasks(taskset, manifest):
|
|
|
|
taskset.add(tasks.AddPackages)
|
|
|
|
if 'assets' in manifest.plugins['puppet']:
|
2014-03-06 20:41:11 +01:00
|
|
|
taskset.add(tasks.CheckAssetsPath)
|
2014-01-09 19:02:46 +01:00
|
|
|
taskset.add(tasks.CopyPuppetAssets)
|
|
|
|
if 'manifest' in manifest.plugins['puppet']:
|
2014-03-06 20:41:11 +01:00
|
|
|
taskset.add(tasks.CheckManifestPath)
|
2014-01-09 19:02:46 +01:00
|
|
|
taskset.add(tasks.ApplyPuppetManifest)
|
2014-05-03 21:50:00 +02:00
|
|
|
if manifest.plugins['puppet'].get('enable_agent', False):
|
|
|
|
taskset.add(tasks.EnableAgent)
|