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

Function buildPlaybookArgs

internal/plugins/ansible/runner.go:259–270  ·  view source on GitHub ↗
(inventoryPath, playbookPath string, opts PlaybookOptions)

Source from the content-addressed store, hash-verified

257}
258
259func buildPlaybookArgs(inventoryPath, playbookPath string, opts PlaybookOptions) []string {
260 args := []string{"-i", inventoryPath, playbookPath}
261 if strings.TrimSpace(opts.Limit) != "" {
262 args = append(args, "--limit", strings.TrimSpace(opts.Limit))
263 }
264 if opts.CheckMode {
265 args = append(args, "--check")
266 }
267 args = append(args, opts.ExtraArgs...)
268
269 return args
270}
271
272func runAnsibleCommand(ctx context.Context, env, args []string, handler OutputLineHandler) CommandResult {
273 started := time.Now()

Calls

no outgoing calls