Documentation ¶
Index ¶
- Variables
- func ChangePerm(owner string, suid, sgid int) (uid, gid int, err error)
- func DisplayScope(s Scope)
- func ExpandTemplates(s Scope, args string) (string, error)
- func ExpandTemplatesIn(s Scope, in []byte) ([]byte, error)
- func ExpandVars(s Scope, args string) (string, error)
- func ExpandVarsOnly(s Scope, args string) (string, error)
- func HomeDir() (string, error)
- func ImportVarsFile(s Scope, path string) error
- func Main(args []string) int
- func MakeCommand(s Scope, task *Task, args string) (Command, Vars, error)
- func RegisterCommand(name string, cmd Command)
- func SV(v interface{}, ok bool) interface{}
- type AdhocProgress
- type AnyMap
- type AnyValue
- type ArgParser
- type AsyncAction
- type CLIReporter
- func (c *CLIReporter) FinishAsyncTask(act *AsyncAction)
- func (c *CLIReporter) FinishHandlers(r *Runner)
- func (c *CLIReporter) FinishTask(task *Task, res *Result)
- func (c *CLIReporter) FinishTasks(r *Runner)
- func (c *CLIReporter) JSONProgress(data []byte) error
- func (c *CLIReporter) Progress(str string)
- func (c *CLIReporter) StartHandlers(r *Runner)
- func (c *CLIReporter) StartTask(task *Task, name, args string, vars Vars)
- func (c *CLIReporter) StartTasks(r *Runner)
- type Command
- type CommandCmd
- type CommandEnv
- type CommandResult
- type Commands
- type Config
- type CopyCmd
- type DownloadCmd
- type Environment
- type Future
- type FutureScope
- type Futures
- type JsonChunkReconstitute
- type JsonChunkReporter
- func (c *JsonChunkReporter) FinishAsyncTask(act *AsyncAction)
- func (c *JsonChunkReporter) FinishHandlers(r *Runner)
- func (c *JsonChunkReporter) FinishTask(task *Task, res *Result)
- func (c *JsonChunkReporter) FinishTasks(r *Runner)
- func (c *JsonChunkReporter) JSONProgress(data []byte) error
- func (c *JsonChunkReporter) Progress(str string)
- func (c *JsonChunkReporter) StartHandlers(r *Runner)
- func (c *JsonChunkReporter) StartTask(task *Task, name, args string, vars Vars)
- func (c *JsonChunkReporter) StartTasks(r *Runner)
- type Map
- type MkFileCmd
- type Module
- type ModuleRun
- type NestedScope
- type Notifications
- type Options
- type Paths
- type Play
- type Playbook
- type PriorityScope
- type ProgressReporter
- type Reporter
- type Result
- type ResultData
- type RunResult
- type Runner
- type SSH
- func (s *SSH) Cleanup()
- func (s *SSH) Command(args ...string) *exec.Cmd
- func (s *SSH) CommandWithOptions(cmd string, args ...string) []string
- func (s *SSH) CopyToHost(src, dest string) error
- func (s *SSH) ImportVagrant(target string) bool
- func (s *SSH) RsyncCommand() string
- func (s *SSH) Run(args ...string) error
- func (s *SSH) RunAndCapture(args ...string) ([]byte, error)
- func (s *SSH) RunAndShow(args ...string) error
- func (s *SSH) SSHCommand(cmd string, args ...string) []string
- func (s *SSH) Start() error
- type Scope
- type ScopeGetter
- type ScriptCmd
- type SeparatePaths
- func (s SeparatePaths) Base() string
- func (s SeparatePaths) File(name string) string
- func (s SeparatePaths) Handler(name string) string
- func (s SeparatePaths) Meta(name string) string
- func (s SeparatePaths) Role(name string) string
- func (s SeparatePaths) Task(name string) string
- func (s SeparatePaths) Vars(name string) string
- type ShellCmd
- type SimplePath
- func (s SimplePath) Base() string
- func (s SimplePath) File(name string) string
- func (s SimplePath) Handler(name string) string
- func (s SimplePath) Meta(name string) string
- func (s SimplePath) Role(name string) string
- func (s SimplePath) Task(name string) string
- func (s SimplePath) Vars(name string) string
- type StrMap
- type Tachyon
- type Task
- func (t *Task) Args() string
- func (t *Task) Async() bool
- func (t *Task) Command() string
- func (t *Task) Future() string
- func (t *Task) Init(env *Environment) error
- func (t *Task) Items() []interface{}
- func (t *Task) Name() string
- func (t *Task) Notify() []string
- func (t *Task) Register() string
- func (t *Task) When() string
- type TaskData
- type Tasks
- type Value
- type Vars
- type VarsFiles
Constants ¶
This section is empty.
Variables ¶
View Source
var Arg0 string
View Source
var DefaultConfig = &Config{false}
View Source
var Release string = "dev"
View Source
var Version string = ""
Functions ¶
func DisplayScope ¶
func DisplayScope(s Scope)
func ImportVarsFile ¶
func RegisterCommand ¶
Types ¶
type AdhocProgress ¶
func (*AdhocProgress) JSONProgress ¶
func (a *AdhocProgress) JSONProgress(data []byte) error
func (*AdhocProgress) Progress ¶
func (a *AdhocProgress) Progress(str string)
type AnyMap ¶
type AnyMap struct {
// contains filtered or unexported fields
}
func (AnyMap) MarshalJSON ¶
type AnyValue ¶
type AnyValue struct {
// contains filtered or unexported fields
}
func (AnyValue) MarshalJSON ¶
type AsyncAction ¶
type AsyncAction struct { Task *Task Error error Result *Result // contains filtered or unexported fields }
func (*AsyncAction) Finish ¶
func (a *AsyncAction) Finish(res *Result, err error)
func (*AsyncAction) Init ¶
func (a *AsyncAction) Init(r *Runner)
type CLIReporter ¶
func (*CLIReporter) FinishAsyncTask ¶
func (c *CLIReporter) FinishAsyncTask(act *AsyncAction)
func (*CLIReporter) FinishHandlers ¶
func (c *CLIReporter) FinishHandlers(r *Runner)
func (*CLIReporter) FinishTask ¶
func (c *CLIReporter) FinishTask(task *Task, res *Result)
func (*CLIReporter) FinishTasks ¶
func (c *CLIReporter) FinishTasks(r *Runner)
func (*CLIReporter) JSONProgress ¶
func (c *CLIReporter) JSONProgress(data []byte) error
func (*CLIReporter) Progress ¶
func (c *CLIReporter) Progress(str string)
func (*CLIReporter) StartHandlers ¶
func (c *CLIReporter) StartHandlers(r *Runner)
func (*CLIReporter) StartTask ¶
func (c *CLIReporter) StartTask(task *Task, name, args string, vars Vars)
func (*CLIReporter) StartTasks ¶
func (c *CLIReporter) StartTasks(r *Runner)
type Command ¶
type Command interface {
Run(env *CommandEnv) (*Result, error)
}
type CommandCmd ¶
type CommandCmd struct { Command string `tachyon:"command,required"` Creates string `tachyon:"creates"` IgnoreFail bool `tachyon:"ignore_failure"` IgnoreChanged bool `tachyon:"ignore_changed"` ManualStatus bool `tachyon:"manual_status"` OkRc int `tachyon:"ok_rc"` ChangedRc int `tachyon:"changed_rc"` ChangedCreate string `tachyon:"changed_create"` }
func (*CommandCmd) Run ¶
func (cmd *CommandCmd) Run(env *CommandEnv) (*Result, error)
type CommandEnv ¶
type CommandEnv struct { Env *Environment Paths Paths // contains filtered or unexported fields }
func NewCommandEnv ¶
func NewCommandEnv(env *Environment, task *Task) *CommandEnv
func (*CommandEnv) Progress ¶
func (e *CommandEnv) Progress(str string)
type CommandResult ¶
func RunCommand ¶
func RunCommand(env *CommandEnv, parts ...string) (*CommandResult, error)
func RunCommandInEnv ¶
func RunCommandInEnv(env *CommandEnv, unixEnv []string, parts ...string) (*CommandResult, error)
type CopyCmd ¶
type DownloadCmd ¶
type DownloadCmd struct { Url string `tachyon:"url,required"` Dest string `tachyon:"dest"` Sha256sum string `tachyon:"sha256sum"` Once bool `tachyon:"once"` }
func (*DownloadCmd) Run ¶
func (d *DownloadCmd) Run(env *CommandEnv) (*Result, error)
type Environment ¶
func NewEnv ¶
func NewEnv(s Scope, cfg *Config) *Environment
func (*Environment) Cleanup ¶
func (e *Environment) Cleanup()
func (*Environment) ReportJSON ¶
func (e *Environment) ReportJSON()
func (*Environment) SetPaths ¶
func (e *Environment) SetPaths(n Paths) Paths
type Future ¶
type FutureScope ¶
type FutureScope struct { Scope // contains filtered or unexported fields }
func NewFutureScope ¶
func NewFutureScope(parent Scope) *FutureScope
func (*FutureScope) AddFuture ¶
func (fs *FutureScope) AddFuture(key string, f *Future)
func (*FutureScope) Results ¶
func (fs *FutureScope) Results() []RunResult
func (*FutureScope) Wait ¶
func (fs *FutureScope) Wait()
type JsonChunkReconstitute ¶
type JsonChunkReconstitute struct {
// contains filtered or unexported fields
}
func (*JsonChunkReconstitute) Input ¶
func (j *JsonChunkReconstitute) Input(data []byte) error
type JsonChunkReporter ¶
func (*JsonChunkReporter) FinishAsyncTask ¶
func (c *JsonChunkReporter) FinishAsyncTask(act *AsyncAction)
func (*JsonChunkReporter) FinishHandlers ¶
func (c *JsonChunkReporter) FinishHandlers(r *Runner)
func (*JsonChunkReporter) FinishTask ¶
func (c *JsonChunkReporter) FinishTask(task *Task, res *Result)
func (*JsonChunkReporter) FinishTasks ¶
func (c *JsonChunkReporter) FinishTasks(r *Runner)
func (*JsonChunkReporter) JSONProgress ¶
func (c *JsonChunkReporter) JSONProgress(data []byte) error
func (*JsonChunkReporter) Progress ¶
func (c *JsonChunkReporter) Progress(str string)
func (*JsonChunkReporter) StartHandlers ¶
func (c *JsonChunkReporter) StartHandlers(r *Runner)
func (*JsonChunkReporter) StartTask ¶
func (c *JsonChunkReporter) StartTask(task *Task, name, args string, vars Vars)
func (*JsonChunkReporter) StartTasks ¶
func (c *JsonChunkReporter) StartTasks(r *Runner)
type MkFileCmd ¶
type ModuleRun ¶
type NestedScope ¶
func NewNestedScope ¶
func NewNestedScope(parent Scope) *NestedScope
func SpliceOverrides ¶
func SpliceOverrides(cur Scope, override *NestedScope) *NestedScope
func (*NestedScope) Empty ¶
func (n *NestedScope) Empty() bool
func (*NestedScope) Flatten ¶
func (n *NestedScope) Flatten() Scope
func (*NestedScope) Set ¶
func (n *NestedScope) Set(key string, v interface{})
type Notifications ¶
type Notifications []string
type Options ¶
type Options struct { Vars map[string]string `short:"s" long:"set" description:"Set a variable"` ShowOutput bool `short:"o" long:"output" description:"Show command output"` Host string `short:"t" long:"host" description:"Run the playbook on another host"` Development bool `long:"dev" description:"Use a dev version of tachyon"` CleanHost bool `long:"clean-host" description:"Clean the host cache before using"` Debug bool `short:"d" long:"debug" description:"Show all information about commands"` Release string `long:"release" description:"The release to use when remotely invoking tachyon"` JSON bool `long:"json" description:"Output the run details in chunked json"` Install bool `long:"install" description:"Install tachyon a remote machine"` }
type Playbook ¶
type Playbook struct { Path string Plays []*Play Env *Environment Vars *NestedScope // contains filtered or unexported fields }
func NewPlaybook ¶
func NewPlaybook(env *Environment, p string) (*Playbook, error)
type PriorityScope ¶
type PriorityScope struct {
// contains filtered or unexported fields
}
func (*PriorityScope) Set ¶
func (p *PriorityScope) Set(key string, val interface{})
type ProgressReporter ¶
type Result ¶
type Result struct { Changed bool Failed bool Data ResultData }
func FailureResult ¶
func RunAdhocTask ¶
func RunAdhocTaskVars ¶
func WrapResult ¶
func WrapResult(changed bool, data ResultData) *Result
func (*Result) MarshalJSON ¶
type ResultData ¶
func (ResultData) Get ¶
func (rd ResultData) Get(key string) interface{}
func (ResultData) Set ¶
func (rd ResultData) Set(key string, v interface{})
type Runner ¶
type Runner struct { Results []RunResult Start time.Time Runtime time.Duration // contains filtered or unexported fields }
func NewRunner ¶
func NewRunner(env *Environment, plays []*Play) *Runner
func (*Runner) AsyncChannel ¶
func (r *Runner) AsyncChannel() chan *AsyncAction
func (*Runner) Run ¶
func (r *Runner) Run(env *Environment) error
func (*Runner) ShouldRunHandler ¶
type SSH ¶
func (*SSH) CommandWithOptions ¶
func (*SSH) CopyToHost ¶
func (*SSH) ImportVagrant ¶
func (*SSH) RsyncCommand ¶
func (*SSH) RunAndShow ¶
type ScopeGetter ¶
type ScriptCmd ¶
type ScriptCmd struct { Script string `tachyon:"command,required"` Creates string `tachyon:"creates"` IgnoreFail bool `tachyon:"ignore_failure"` IgnoreChanged bool `tachyon:"ignore_changed"` ManualStatus bool `tachyon:"manual_status"` OkRc int `tachyon:"ok_rc"` ChangedRc int `tachyon:"changed_rc"` ChangedCreate string `tachyon:"changed_create"` }
type SeparatePaths ¶
func (SeparatePaths) Base ¶
func (s SeparatePaths) Base() string
func (SeparatePaths) File ¶
func (s SeparatePaths) File(name string) string
func (SeparatePaths) Handler ¶
func (s SeparatePaths) Handler(name string) string
func (SeparatePaths) Meta ¶
func (s SeparatePaths) Meta(name string) string
func (SeparatePaths) Role ¶
func (s SeparatePaths) Role(name string) string
func (SeparatePaths) Task ¶
func (s SeparatePaths) Task(name string) string
func (SeparatePaths) Vars ¶
func (s SeparatePaths) Vars(name string) string
type ShellCmd ¶
type ShellCmd struct { Command string `tachyon:"command,required"` Creates string `tachyon:"creates"` IgnoreFail bool `tachyon:"ignore_failure"` IgnoreChanged bool `tachyon:"ignore_changed"` ManualStatus bool `tachyon:"manual_status"` OkRc int `tachyon:"ok_rc"` ChangedRc int `tachyon:"changed_rc"` ChangedCreate string `tachyon:"changed_create"` }
type SimplePath ¶
type SimplePath struct {
Root string
}
func (SimplePath) Base ¶
func (s SimplePath) Base() string
func (SimplePath) File ¶
func (s SimplePath) File(name string) string
func (SimplePath) Handler ¶
func (s SimplePath) Handler(name string) string
func (SimplePath) Meta ¶
func (s SimplePath) Meta(name string) string
func (SimplePath) Role ¶
func (s SimplePath) Role(name string) string
func (SimplePath) Task ¶
func (s SimplePath) Task(name string) string
func (SimplePath) Vars ¶
func (s SimplePath) Vars(name string) string
type StrMap ¶
type StrMap struct {
// contains filtered or unexported fields
}
func (StrMap) MarshalJSON ¶
type Tachyon ¶
type Task ¶
type Task struct { Play *Play File string Vars Vars IncludeVars Vars Paths Paths // contains filtered or unexported fields }
func (*Task) Init ¶
func (t *Task) Init(env *Environment) error
type Vars ¶
func VarsFromStrMap ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.