detect if the machine is already initialised

This commit is contained in:
Pavel Sviderski
2024-09-23 14:21:06 +10:00
parent 43e2bf86fb
commit d66818ea77
8 changed files with 180 additions and 35 deletions
-2
View File
@@ -19,8 +19,6 @@ type RemoteMachine struct {
// provisionMachine provisions the remote machine by downloading the Uncloud install script from GitHub and running it.
func provisionMachine(ctx context.Context, exec sshexec.Executor) error {
// TODO: Check if the machine is already provisioned and ask the user to reset it first.
user, err := exec.Run(ctx, "whoami")
if err != nil {
return fmt.Errorf("run whoami: %w", err)