(inventoryPath, playbookPath string, opts PlaybookOptions)
| 257 | } |
| 258 | |
| 259 | func 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 | |
| 272 | func runAnsibleCommand(ctx context.Context, env, args []string, handler OutputLineHandler) CommandResult { |
| 273 | started := time.Now() |
no outgoing calls