This commit is contained in:
2025-07-30 15:21:10 +02:00
parent 2bc2c07114
commit 685a58aa14
48 changed files with 60 additions and 428 deletions

View File

@@ -31,7 +31,9 @@ fn args_get(args_ ArgsGet) ArgsGet {
pub fn get(args_ ArgsGet) !&MyceliumInstaller {
mut context := base.context()!
mut args := args_get(args_)
mut obj := MyceliumInstaller{}
mut obj := MyceliumInstaller{
name: args.name
}
if args.name !in mycelium_installer_global {
if !exists(args)! {
set(obj)!
@@ -79,19 +81,7 @@ fn set_in_mem(o MyceliumInstaller) ! {
mycelium_installer_default = o.name
}
@[params]
pub struct PlayArgs {
pub mut:
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}
pub fn play(mut plbook PlayBook) ! {
mut args := args_
mut plbook := args.plbook or { playbook.new(text: args.heroscript)! }
mut install_actions := plbook.find(filter: 'mycelium_installer.configure')!
if install_actions.len > 0 {
for install_action in install_actions {

View File

@@ -22,19 +22,7 @@ pub fn get(args_ ArgsGet) !&WireGuard {
return &WireGuard{}
}
@[params]
pub struct PlayArgs {
pub mut:
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}
pub fn play(mut plbook PlayBook) ! {
mut args := args_
mut plbook := args.plbook or { playbook.new(text: args.heroscript)! }
mut other_actions := plbook.find(filter: 'wireguard_installer.')!
for other_action in other_actions {
if other_action.name in ['destroy', 'install', 'build'] {

View File

@@ -23,19 +23,7 @@ pub fn get(args_ ArgsGet) !&YggdrasilInstaller {
return &YggdrasilInstaller{}
}
@[params]
pub struct PlayArgs {
pub mut:
heroscript string // if filled in then plbook will be made out of it
plbook ?playbook.PlayBook
reset bool
}
pub fn play(mut plbook PlayBook) ! {
mut args := args_
mut plbook := args.plbook or { playbook.new(text: args.heroscript)! }
mut other_actions := plbook.find(filter: 'yggdrasil.')!
for other_action in other_actions {
if other_action.name in ['destroy', 'install', 'build'] {