mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-12-16 14:50:22 +00:00
- uses salt bootstrap to install minion code
- custom grains can be set.
- option to specify master in the manifest.
e.g manifest (TODO: Add this to doc.)
"salt": {
"install_source": "git",
"version": "develop", \\ Only if the source is git
"master": "", \\ salt master ip or fqdn
"grains": {
"custom_grain1": "custom_grain_value1",
"custom_grain2": "custom_grain_value2",
}
}
14 lines
406 B
Python
14 lines
406 B
Python
import tasks
|
|
|
|
|
|
def validate_manifest(data, validator, error):
|
|
import os.path
|
|
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json'))
|
|
validator(data, schema_path)
|
|
|
|
|
|
def resolve_tasks(taskset, manifest):
|
|
taskset.add(tasks.InstallSaltDependencies)
|
|
taskset.add(tasks.BootstrapSaltMinion)
|
|
if 'grains' in manifest.plugins['salt']:
|
|
taskset.add(tasks.SetSaltGrains)
|