MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / executeRemoteBootstrapScript

Function executeRemoteBootstrapScript

internal/ui/plugins/ansible/plugin.go:1529–1540  ·  view source on GitHub ↗
(
	ctx context.Context,
	user, target, password, keyPath, script string,
	stream func(string),
)

Source from the content-addressed store, hash-verified

1527}
1528
1529func executeRemoteBootstrapScript(
1530 ctx context.Context,
1531 user, target, password, keyPath, script string,
1532 stream func(string),
1533) (string, error) {
1534 remoteCmd := "sh -s"
1535 if !strings.EqualFold(strings.TrimSpace(user), "root") {
1536 remoteCmd = "sudo -n sh -s"
1537 }
1538
1539 return executeSSHScript(ctx, user, target, password, keyPath, remoteCmd, script, stream)
1540}
1541
1542func executeSSHScript(
1543 ctx context.Context,

Callers 1

Calls 1

executeSSHScriptFunction · 0.85

Tested by

no test coverage detected