chore: add current provisioning state before migration
This commit is contained in:
parent
a9703b4748
commit
50745b0f22
660 changed files with 88126 additions and 0 deletions
28
taskservs/os/basecamp/prepare
Executable file
28
taskservs/os/basecamp/prepare
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env nu
|
||||
# Info: Prepare for os/basecamp installation
|
||||
# Author: JesusPerezLorenzo
|
||||
# Release: 1.0.2
|
||||
# Date: 19-11-2023
|
||||
|
||||
use lib_provisioning/cmd/env.nu *
|
||||
use lib_provisioning/cmd/lib.nu *
|
||||
|
||||
use lib_provisioning/utils/ui.nu *
|
||||
|
||||
print $"(_ansi green_bold)OS(_ansi reset) with ($env.PROVISIONING_VARS) "
|
||||
|
||||
let defs = load_defs
|
||||
|
||||
#sops_cmd "decrypt" /wuwei/repo-cnz/klab/basecamp/.keys.k | save --force /tmp/ky.k
|
||||
|
||||
let ssh_keys = ($defs.taskserv.ssh_keys | str replace "~" $env.HOME | str trim)
|
||||
|
||||
if $ssh_keys != "" {
|
||||
let target_path = $env.PROVISIONING_WK_ENV_PATH
|
||||
^mkdir -p $"($target_path)/.ssh"
|
||||
for key in ($ssh_keys | split row " ") {
|
||||
log_debug $"on ($key)"
|
||||
if ($key | path exists) { cp $key $"($target_path)/.ssh" }
|
||||
if ($"($key).pub" | path exists) { cp $"($key).pub" $"($target_path)/.ssh" }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue