mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Add partial for config of root password
This commit is contained in:
parent
71e0d943fc
commit
ad52df37bd
3 changed files with 12 additions and 2 deletions
|
@ -13,3 +13,8 @@ for path in partial_json + partial_yaml:
|
|||
raise Exception(msg)
|
||||
partials[key] = load_data(path)
|
||||
|
||||
import random
|
||||
import string
|
||||
pool = string.ascii_uppercase + string.ascii_lowercase + string.digits
|
||||
random_password = ''.join(random.choice(pool) for _ in range(16))
|
||||
partials['root_password']['plugins']['root_password']['password'] = random_password
|
||||
|
|
4
tests/integration/manifests/root_password.yml
Normal file
4
tests/integration/manifests/root_password.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
plugins:
|
||||
root_password:
|
||||
password: random password set by the partial manifest loader
|
|
@ -20,7 +20,8 @@ volume:
|
|||
type: msdos
|
||||
""")
|
||||
manifest_data = tools.merge_dicts(partials['base'], partials['stable64'],
|
||||
partials['unpartitioned'], manifest_data)
|
||||
partials['unpartitioned'], partials['root_password'],
|
||||
manifest_data)
|
||||
|
||||
build_server = pick_build_server(build_servers, manifest_data)
|
||||
manifest_data = build_server.apply_build_settings(manifest_data)
|
||||
|
|
Loading…
Add table
Reference in a new issue