go-ansible/cmd/ansible/cmd.go
Snider b3eed66230
Some checks failed
CI / test (pull_request) Failing after 2s
CI / auto-fix (pull_request) Failing after 0s
CI / auto-merge (pull_request) Failing after 0s
refactor(ansible): migrate module path to dappco.re/go/core/ansible
Update go.mod module line and all dependencies from forge.lthn.ai to
dappco.re paths (core v0.5.0, log v0.1.0, io v0.2.0). Update all .go
import paths. Rewrite cmd/ansible/ for new core.Command API replacing
the cobra-based CLI integration. Update documentation references.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:50:56 +00:00

33 lines
842 B
Go

package anscmd
import (
"dappco.re/go/core"
)
// Register registers the 'ansible' command and all subcommands on the given Core instance.
func Register(c *core.Core) {
c.Command("ansible", core.Command{
Description: "Run Ansible playbooks natively (no Python required)",
Action: runAnsible,
Flags: core.Options{
{Key: "inventory", Value: ""},
{Key: "limit", Value: ""},
{Key: "tags", Value: ""},
{Key: "skip-tags", Value: ""},
{Key: "extra-vars", Value: ""},
{Key: "verbose", Value: 0},
{Key: "check", Value: false},
},
})
c.Command("ansible/test", core.Command{
Description: "Test SSH connectivity to a host",
Action: runAnsibleTest,
Flags: core.Options{
{Key: "user", Value: "root"},
{Key: "password", Value: ""},
{Key: "key", Value: ""},
{Key: "port", Value: 22},
},
})
}