Documentation
¶
Index ¶
- Variables
- func Config(b []byte, debug bool, cmd string) error
- func GetResult(b []byte, debug bool, cmd string) ([]runner.ShellResult, error)
- func HostResolve(b []byte, debug bool) error
- func MakeKeyPairScript(tmpl *template.Template) (string, error)
- func NewPassword(config []byte, debug bool) error
- func NewPasswordScript(b []byte, tmpl *template.Template) (string, error)
- func PasswordLess(config []byte, debug bool) error
- func Timezone(config []byte, debug bool) error
- func Ulimit(b []byte, debug bool) error
- type DNS
- type IPAddress
- type ParseConfig
- type PasswordConfig
- type YUM
Constants ¶
This section is empty.
Variables ¶
View Source
var NewPasswordTmpl = template.Must(template.New("NewPasswordTmpl").Parse(dedent.Dedent(`
#!/bin/bash
set -e
echo "{{ .NewPassword }}" | passwd --stdin root
`)))
NewPasswordTmpl 本机互信脚本模板
View Source
var PasswordLessTmpl = template.Must(template.New("PasswordLessTmpl").Parse(dedent.Dedent(`
#!/bin/bash
set -e
mkdir -p ~/.ssh
tee ~/.ssh/id_rsa.pub <<EOF
{{ .PublicKey }}
EOF
tee ~/.ssh/authorized_keys <<EOF
{{ .PublicKey }}
EOF
tee ~/.ssh/id_rsa <<EOF
{{ .PrivateKey }}
EOF
chmod 600 ~/.ssh -R
`)))
PasswordLessTmpl 本机互信脚本模板
Functions ¶
func HostResolve ¶
func NewPassword ¶
func PasswordLess ¶
Types ¶
type ParseConfig ¶
type PasswordConfig ¶
type PasswordConfig struct {
Password string `yaml:"newRootPassword"`
}
func ParseNewPasswordConfig ¶
func ParseNewPasswordConfig(b []byte) (PasswordConfig, error)
Click to show internal directories.
Click to hide internal directories.