Documentation
¶
Index ¶
- func RunModule(m Module, flags *pflag.FlagSet)
- type Inventory
- type InventoryGroup
- type InventoryHost
- type MessageLog
- type Module
- type ModuleResponse
- func (r *ModuleResponse) Changed() *ModuleResponse
- func (r *ModuleResponse) Data() map[string]interface{}
- func (r *ModuleResponse) Failed() *ModuleResponse
- func (r *ModuleResponse) HasChanged() bool
- func (r *ModuleResponse) HasFailed() bool
- func (r *ModuleResponse) MarshalJSON() ([]byte, error)
- func (r *ModuleResponse) Msg(msg string) *ModuleResponse
- func (r *ModuleResponse) Set(key string, value interface{}) *ModuleResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
Inventory represents a Ansible 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 ¶
MarshalJSON converts this object into the ansible format
type InventoryGroup ¶
InventoryGroup represents a Group in an Ansible Inventory
type InventoryHost ¶
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) String ¶
func (l *MessageLog) String() string
type Module ¶
type Module interface {
Args() interface{}
Run() (ModuleResponse, error)
}
Module interface for Ansible modules
type ModuleResponse ¶
type ModuleResponse struct {
// contains filtered or unexported fields
}
ModuleResponse represents the reponse of the module
func (*ModuleResponse) Changed ¶
func (r *ModuleResponse) Changed() *ModuleResponse
Changed marks the the module as changed
func (*ModuleResponse) Data ¶ added in v0.2.0
func (r *ModuleResponse) Data() map[string]interface{}
Data returns the data of the response
func (*ModuleResponse) Failed ¶
func (r *ModuleResponse) Failed() *ModuleResponse
Failed marks the module as failed
func (*ModuleResponse) HasChanged ¶ added in v0.2.0
func (r *ModuleResponse) HasChanged() bool
HasChanged returns true if the module has changed
func (*ModuleResponse) HasFailed ¶ added in v0.2.0
func (r *ModuleResponse) HasFailed() bool
HasFailed returns true if the module has failed
func (*ModuleResponse) MarshalJSON ¶
func (r *ModuleResponse) MarshalJSON() ([]byte, error)
MarshalJSON custom json marshalling
func (*ModuleResponse) Msg ¶
func (r *ModuleResponse) Msg(msg string) *ModuleResponse
Msg sets the module message
func (*ModuleResponse) Set ¶
func (r *ModuleResponse) Set(key string, value interface{}) *ModuleResponse
Set adds data to the reponse