AWX (Ansible Tower) SDK for the Go programming language.
This SDK has been developed against AWX 14.0.0
.
go get -u github.com/Kaginari/ansible-tower-sdk
We can simply import goawx
and call its services, such as the PingService:
import (
"log"
tower "github.com/Kaginari/ansible-tower-sdk"
)
func main() {
client := tower.NewAWX("http://awx.your_server_host.com", "your_awx_username", "your_awx_passwd", nil)
result, err := client.PingService.Ping()
if err != nil {
log.Fatalf("Ping awx err: %s", err)
}
log.Println("Ping awx: ", result)
}
More examples can be found at here.
ansible-tower-sdk is still in development, and its roadmap could be found at here.
There are many ways to contribute to awx-go.
- Submit bugs via Github issues;
- Submit a pull request for fixes or features;
- this sdk is forked from awx github.com/mrcrilly/goawx to add some other api supports