aini

package module
v0.0.0-...-6a7be96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2019 License: MIT Imports: 9 Imported by: 0

README

aini

Simple library for parsing Ansible host files (ini) in Go.

Installing

Use the 'go get' command to download the package.

go get github.com/outten45/aini

Then import the package into your project.

import "github.com/outten45/aini"

TODO

  • expanding host names
  • :vars and :children in the group
  • additional ssh options

Credits

To the Ansible team for writing easy to follow code.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	Name       string
	Port       int
	User       string
	Pass       string
	PrivateKey string
}

type Hosts

type Hosts struct {
	Groups map[string][]Host
	// contains filtered or unexported fields
}

func NewFile

func NewFile(f string) (*Hosts, error)

func NewParser

func NewParser(r io.Reader) (*Hosts, error)

func (*Hosts) Match

func (h *Hosts) Match(m string) []Host

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL