mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Reorder plugin init scripts
Let validate_manifest() always be the first function
This commit is contained in:
parent
0a49901476
commit
6b6ad527ce
5 changed files with 25 additions and 25 deletions
|
@ -1,5 +1,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
def validate_manifest(data, schema_validate):
|
||||||
|
from os import path
|
||||||
|
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
||||||
|
schema_validate(data, schema_path)
|
||||||
|
|
||||||
|
|
||||||
def tasks(tasklist, manifest):
|
def tasks(tasklist, manifest):
|
||||||
import tasks
|
import tasks
|
||||||
tasklist.add(tasks.AddSudoPackage,
|
tasklist.add(tasks.AddSudoPackage,
|
||||||
|
@ -7,9 +13,3 @@ def tasks(tasklist, manifest):
|
||||||
tasks.PasswordlessSudo,
|
tasks.PasswordlessSudo,
|
||||||
tasks.AdminUserCredentials,
|
tasks.AdminUserCredentials,
|
||||||
tasks.DisableRootLogin)
|
tasks.DisableRootLogin)
|
||||||
|
|
||||||
|
|
||||||
def validate_manifest(data, schema_validate):
|
|
||||||
from os import path
|
|
||||||
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
|
||||||
schema_validate(data, schema_path)
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
def tasks(tasklist, manifest):
|
def tasks(tasklist, manifest):
|
||||||
from tasks import WriteMetadata
|
from tasks import WriteMetadata
|
||||||
tasklist.add(WriteMetadata
|
tasklist.add(WriteMetadata)
|
||||||
|
|
|
@ -10,6 +10,12 @@ from common.tasks import filesystem
|
||||||
from common.tasks import partitioning
|
from common.tasks import partitioning
|
||||||
|
|
||||||
|
|
||||||
|
def validate_manifest(data, schema_validate):
|
||||||
|
from os import path
|
||||||
|
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
||||||
|
schema_validate(data, schema_path)
|
||||||
|
|
||||||
|
|
||||||
def tasks(tasklist, manifest):
|
def tasks(tasklist, manifest):
|
||||||
settings = manifest.plugins['prebootstrapped']
|
settings = manifest.plugins['prebootstrapped']
|
||||||
skip_tasks = [ebs.Create,
|
skip_tasks = [ebs.Create,
|
||||||
|
@ -47,9 +53,3 @@ def rollback_tasks(tasklist, tasks_completed, manifest):
|
||||||
counter_task(CreateFromSnapshot, volume.Delete)
|
counter_task(CreateFromSnapshot, volume.Delete)
|
||||||
else:
|
else:
|
||||||
counter_task(CreateFromImage, volume.Delete)
|
counter_task(CreateFromImage, volume.Delete)
|
||||||
|
|
||||||
|
|
||||||
def validate_manifest(data, schema_validate):
|
|
||||||
from os import path
|
|
||||||
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
|
||||||
schema_validate(data, schema_path)
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
def validate_manifest(data, schema_validate):
|
||||||
|
from os import path
|
||||||
|
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
||||||
|
schema_validate(data, schema_path)
|
||||||
|
|
||||||
|
|
||||||
def tasks(tasklist, manifest):
|
def tasks(tasklist, manifest):
|
||||||
from common.tasks.security import DisableSSHPasswordAuthentication
|
from common.tasks.security import DisableSSHPasswordAuthentication
|
||||||
from tasks import SetRootPassword
|
from tasks import SetRootPassword
|
||||||
tasklist.remove(DisableSSHPasswordAuthentication)
|
tasklist.remove(DisableSSHPasswordAuthentication)
|
||||||
tasklist.add(SetRootPassword)
|
tasklist.add(SetRootPassword)
|
||||||
|
|
||||||
|
|
||||||
def validate_manifest(data, schema_validate):
|
|
||||||
from os import path
|
|
||||||
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
|
||||||
schema_validate(data, schema_path)
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
|
|
||||||
def tasks(tasklist, manifest):
|
|
||||||
import tasks
|
|
||||||
tasklist.add(tasks.AddUnattendedUpgradesPackage,
|
|
||||||
tasks.EnablePeriodicUpgrades)
|
|
||||||
|
|
||||||
|
|
||||||
def validate_manifest(data, schema_validate):
|
def validate_manifest(data, schema_validate):
|
||||||
from os import path
|
from os import path
|
||||||
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json'))
|
||||||
schema_validate(data, schema_path)
|
schema_validate(data, schema_path)
|
||||||
|
|
||||||
|
|
||||||
|
def tasks(tasklist, manifest):
|
||||||
|
import tasks
|
||||||
|
tasklist.add(tasks.AddUnattendedUpgradesPackage,
|
||||||
|
tasks.EnablePeriodicUpgrades)
|
||||||
|
|
Loading…
Add table
Reference in a new issue