Skip to content

Go module for running Ansible Commandors on a Linux system.

License

Notifications You must be signed in to change notification settings

arillso/go.ansible

Repository files navigation

GO Ansible

license GitHub go.mod Go version GitHub release Go Report Card

A Go module for programmatically executing Ansible playbooks with support for Galaxy integration, temporary file management, and flexible configuration.

Documentation: https://pkg.go.dev/github.com/arillso/go.ansible

Quick Start

Install the module:

go get github.com/arillso/go.ansible

Basic usage:

package main

import (
    "context"
    "log"
    "github.com/arillso/go.ansible"
)

func main() {
    pb := ansible.NewPlaybook()
    pb.Config.Playbooks = []string{"site.yml"}
    pb.Config.Inventories = []string{"localhost,"}

    if err := pb.Exec(context.Background()); err != nil {
        log.Fatalf("Execution failed: %v", err)
    }
}

Features

  • Automated playbook resolution with glob pattern support
  • Secure temporary file management for SSH keys and Vault passwords
  • Ansible Galaxy role and collection installation
  • Flexible command customization (inventories, extra vars, SSH options)
  • Debug mode with command tracing
  • Context-based execution with cancellation support

Testing

Run tests:

go test -v ./...

License

MIT License

Copyright

(c) 2026, Arillso

About

Go module for running Ansible Commandors on a Linux system.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •