Documentation ¶
Index ¶
- type DebianGeneric
- func (script *DebianGeneric) ActivateDaemons()
- func (script *DebianGeneric) AddPPA(ppa ...string)
- func (script *DebianGeneric) AddRepo(r interface{})
- func (script *DebianGeneric) DeactivateDaemons()
- func (script *DebianGeneric) InstallPkgDeps()
- func (script *DebianGeneric) InstallPkgs(pkgs ...string)
- func (script *DebianGeneric) InstallSaltMaster(versions ...string)
- func (script *DebianGeneric) InstallSaltMinion(versions ...string)
- func (script *DebianGeneric) ProcessDisable(ps string)
- func (script *DebianGeneric) ProcessEnable(ps string)
- func (script *DebianGeneric) UpdateRepos()
- func (script *DebianGeneric) UpgradePkgs()
- type LinuxGeneric
- func (script *LinuxGeneric) ActivateDaemons()
- func (script *LinuxGeneric) AddLine(file string, line string)
- func (script *LinuxGeneric) AppDir() string
- func (script *LinuxGeneric) CheckPathExists(path string)
- func (script *LinuxGeneric) ChgrpRecurse(name string, g string)
- func (script *LinuxGeneric) Chmod(name string, mode os.FileMode)
- func (script *LinuxGeneric) ChownRecurse(name string, u string)
- func (script *LinuxGeneric) CmdOut(def string, cmd string, args ...interface{}) string
- func (script *LinuxGeneric) DeactivateDaemons()
- func (script *LinuxGeneric) Init(workingDir string)
- func (script *LinuxGeneric) Mkdir(path string)
- func (script *LinuxGeneric) ProcessExists(ps string) bool
- func (script *LinuxGeneric) ProcessRestart(ps ...string)
- func (script *LinuxGeneric) ProcessStart(ps ...string)
- func (script *LinuxGeneric) Raw() interface{}
- func (script *LinuxGeneric) ReadAsBase64(path string) string
- func (script *LinuxGeneric) Run(cmd string, args ...interface{}) error
- func (script *LinuxGeneric) SetEnv(key, value string)
- func (script *LinuxGeneric) Symlink(oldname, newname string)
- func (script *LinuxGeneric) UncommentLine(file string, regex string)
- func (script *LinuxGeneric) UserExists(u string) bool
- func (script *LinuxGeneric) WorkingDir() string
- func (script *LinuxGeneric) WriteBase64String(filename string, data string)
- func (script *LinuxGeneric) WriteBytes(filename string, data []byte)
- func (script *LinuxGeneric) WriteString(filename string, data string)
- type Script
- type UbuntuGeneric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebianGeneric ¶
type DebianGeneric struct {
LinuxGeneric
}
func (*DebianGeneric) ActivateDaemons ¶
func (script *DebianGeneric) ActivateDaemons()
func (*DebianGeneric) AddPPA ¶
func (script *DebianGeneric) AddPPA(ppa ...string)
func (*DebianGeneric) AddRepo ¶
func (script *DebianGeneric) AddRepo(r interface{})
Example: wget -O- https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
nano /etc/apt/sources.list.d/saltstack.list deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2015.8 trusty main
func (*DebianGeneric) DeactivateDaemons ¶
func (script *DebianGeneric) DeactivateDaemons()
func (*DebianGeneric) InstallPkgDeps ¶
func (script *DebianGeneric) InstallPkgDeps()
func (*DebianGeneric) InstallPkgs ¶
func (script *DebianGeneric) InstallPkgs(pkgs ...string)
func (*DebianGeneric) InstallSaltMaster ¶
func (script *DebianGeneric) InstallSaltMaster(versions ...string)
func (*DebianGeneric) InstallSaltMinion ¶
func (script *DebianGeneric) InstallSaltMinion(versions ...string)
func (*DebianGeneric) ProcessDisable ¶
func (script *DebianGeneric) ProcessDisable(ps string)
func (*DebianGeneric) ProcessEnable ¶
func (script *DebianGeneric) ProcessEnable(ps string)
func (*DebianGeneric) UpdateRepos ¶
func (script *DebianGeneric) UpdateRepos()
func (*DebianGeneric) UpgradePkgs ¶
func (script *DebianGeneric) UpgradePkgs()
type LinuxGeneric ¶
type LinuxGeneric struct {
// contains filtered or unexported fields
}
Linux version must use Systemd as init process
func (*LinuxGeneric) ActivateDaemons ¶
func (script *LinuxGeneric) ActivateDaemons()
func (*LinuxGeneric) AddLine ¶
func (script *LinuxGeneric) AddLine(file string, line string)
func (*LinuxGeneric) AppDir ¶
func (script *LinuxGeneric) AppDir() string
func (*LinuxGeneric) CheckPathExists ¶
func (script *LinuxGeneric) CheckPathExists(path string)
func (*LinuxGeneric) ChgrpRecurse ¶
func (script *LinuxGeneric) ChgrpRecurse(name string, g string)
func (*LinuxGeneric) ChownRecurse ¶
func (script *LinuxGeneric) ChownRecurse(name string, u string)
func (*LinuxGeneric) CmdOut ¶
func (script *LinuxGeneric) CmdOut(def string, cmd string, args ...interface{}) string
func (*LinuxGeneric) DeactivateDaemons ¶
func (script *LinuxGeneric) DeactivateDaemons()
func (*LinuxGeneric) Init ¶
func (script *LinuxGeneric) Init(workingDir string)
func (*LinuxGeneric) Mkdir ¶
func (script *LinuxGeneric) Mkdir(path string)
func (*LinuxGeneric) ProcessExists ¶
func (script *LinuxGeneric) ProcessExists(ps string) bool
func (*LinuxGeneric) ProcessRestart ¶
func (script *LinuxGeneric) ProcessRestart(ps ...string)
func (*LinuxGeneric) ProcessStart ¶
func (script *LinuxGeneric) ProcessStart(ps ...string)
func (*LinuxGeneric) Raw ¶
func (script *LinuxGeneric) Raw() interface{}
func (*LinuxGeneric) ReadAsBase64 ¶
func (script *LinuxGeneric) ReadAsBase64(path string) string
func (*LinuxGeneric) Run ¶
func (script *LinuxGeneric) Run(cmd string, args ...interface{}) error
func (*LinuxGeneric) SetEnv ¶
func (script *LinuxGeneric) SetEnv(key, value string)
func (*LinuxGeneric) Symlink ¶
func (script *LinuxGeneric) Symlink(oldname, newname string)
func (*LinuxGeneric) UncommentLine ¶
func (script *LinuxGeneric) UncommentLine(file string, regex string)
func (*LinuxGeneric) UserExists ¶
func (script *LinuxGeneric) UserExists(u string) bool
func (*LinuxGeneric) WorkingDir ¶
func (script *LinuxGeneric) WorkingDir() string
func (*LinuxGeneric) WriteBase64String ¶
func (script *LinuxGeneric) WriteBase64String(filename string, data string)
func (*LinuxGeneric) WriteBytes ¶
func (script *LinuxGeneric) WriteBytes(filename string, data []byte)
func (*LinuxGeneric) WriteString ¶
func (script *LinuxGeneric) WriteString(filename string, data string)
type Script ¶
type Script interface { Init(workingDir string) AppDir() string WorkingDir() string Raw() interface{} CmdOut(def string, cmd string, args ...interface{}) string Run(cmd string, args ...interface{}) error SetEnv(key, value string) Mkdir(path string) Chmod(name string, mode os.FileMode) Symlink(oldname, newname string) ChownRecurse(name string, u string) ChgrpRecurse(name string, g string) UserExists(u string) bool CheckPathExists(path string) ReadAsBase64(path string) string WriteBase64String(filename string, data string) WriteString(filename string, data string) WriteBytes(filename string, data []byte) AddLine(file string, line string) UncommentLine(file string, regex string) ProcessExists(ps string) bool ProcessEnable(ps string) ProcessStart(ps ...string) ProcessRestart(ps ...string) ProcessDisable(ps string) AddRepo(r interface{}) UpdateRepos() UpgradePkgs() InstallPkgDeps() InstallPkgs(pkgs ...string) DeactivateDaemons() ActivateDaemons() InstallSaltMaster(versions ...string) InstallSaltMinion(versions ...string) }
type UbuntuGeneric ¶
type UbuntuGeneric struct {
DebianGeneric
}
func (*UbuntuGeneric) InstallSaltMaster ¶
func (script *UbuntuGeneric) InstallSaltMaster(versions ...string)
func (*UbuntuGeneric) InstallSaltMinion ¶
func (script *UbuntuGeneric) InstallSaltMinion(versions ...string)
func (*UbuntuGeneric) ProcessDisable ¶
func (script *UbuntuGeneric) ProcessDisable(ps string)
func (*UbuntuGeneric) ProcessEnable ¶
func (script *UbuntuGeneric) ProcessEnable(ps string)
Click to show internal directories.
Click to hide internal directories.