ansible

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunModule

func RunModule(m Module, flags *pflag.FlagSet)

Types

type Inventory

type Inventory struct {
	// contains filtered or unexported fields
}

Inventory represents a Ansible Inventory

func NewInventory

func NewInventory() Inventory

NewInventory creates a new empty Inventory

func (Inventory) AddGroup

func (i Inventory) AddGroup(group InventoryGroup)

AddGroup adds a group to the inventory

func (Inventory) AddHost

func (i Inventory) AddHost(host InventoryHost)

AddHost adds the host to the inventory

func (Inventory) MarshalJSON

func (i Inventory) MarshalJSON() ([]byte, error)

MarshalJSON converts this object into the ansible format

type InventoryGroup

type InventoryGroup struct {
	Name     string
	Vars     map[string]interface{}
	Children []string
}

InventoryGroup represents a Group in an Ansible Inventory

type InventoryHost

type InventoryHost struct {
	Host   string
	Groups []string
	Vars   map[string]interface{}
}

InventoryHost represents a Host in an Ansible Inventory

type MessageLog

type MessageLog struct {
	// contains filtered or unexported fields
}

MessageLog holds messages during module run

func (*MessageLog) Add

func (l *MessageLog) Add(msg string)

Add appends a message to the log

func (*MessageLog) String

func (l *MessageLog) String() string

type Module

type Module interface {
	Args() interface{}
	Run() (ModuleResponse, error)
}

type ModuleResponse

type ModuleResponse struct {
	// contains filtered or unexported fields
}

func (*ModuleResponse) Changed

func (r *ModuleResponse) Changed() *ModuleResponse

func (*ModuleResponse) Failed

func (r *ModuleResponse) Failed() *ModuleResponse

func (*ModuleResponse) MarshalJSON

func (r *ModuleResponse) MarshalJSON() ([]byte, error)

func (*ModuleResponse) Msg

func (r *ModuleResponse) Msg(msg string) *ModuleResponse

func (*ModuleResponse) Set

func (r *ModuleResponse) Set(key string, value interface{}) *ModuleResponse

Jump to

Keyboard shortcuts

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