Documentation
¶
Index ¶
- type Executor
- func (e Executor) ExecuteOnHosts(outputPrefix string, hostGroup map[string][]remote.Host, pool *remote.HostPool, ...) error
- func (e Executor) ExecuteOperations(outputPrefix string, hostGroup map[string][]remote.Host, ops []module.Module) error
- func (e Executor) LoadHostsFile(filename string) (map[string][]remote.Host, error)
- func (e Executor) LoadTasksFile(filename string) ([]module.Module, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶ added in v0.0.9
type Executor struct {
// contains filtered or unexported fields
}
func (Executor) ExecuteOnHosts ¶ added in v0.0.22
func (Executor) ExecuteOperations ¶ added in v0.0.9
func (Executor) LoadHostsFile ¶ added in v0.0.23
LoadHostsFile reads a hosts file and returns a map from role name to parsed Host structs. The file is expected to be a flat YAML map keyed by role, for example:
all: - ops:PASSWORD@127.0.0.1:9001 main: - ops:PASSWORD@127.0.0.1:9002
The outer "hosts:" wrapper that the legacy combined format used is intentionally not accepted; hosts.yaml is dedicated to host entries.
func (Executor) LoadTasksFile ¶ added in v0.0.23
LoadTasksFile reads a task file and returns the list of operations to execute. The file is a YAML sequence whose top level is the task list — there is no wrapping "tasks:" key. Each entry's name defaults to DefaultName() and its role defaults to RoleAll when the corresponding YAML field is empty.
type Option ¶
type Option func(e *Executor)
Option configures an Executor.
func WithMaxProcs ¶
WithMaxProcs sets the maximum number of concurrent operations. A value of 0 or negative is ignored and the default is kept.
func WithVerboseLevel ¶ added in v0.0.19
WithVerboseLevel sets the verbosity level for executor output.