Skip to content

Commit

Permalink
add '-ssh-external' option to prepare subcommand
Browse files Browse the repository at this point in the history
modify gofmt

modify gofmt
  • Loading branch information
Tomohiro Miyakoshi committed Oct 28, 2016
1 parent ce3ca64 commit 234e312
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion commands/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ type PrepareCmd struct {

askSudoPassword bool
askKeyPassword bool

sshExternal bool
}

// Name return subcommand name
Expand All @@ -60,8 +62,9 @@ func (*PrepareCmd) Usage() string {
[-config=/path/to/config.toml]
[-ask-key-password]
[-debug]
[-ssh-external]
[SERVER]...
[SERVER]...
`
}

Expand All @@ -88,6 +91,13 @@ func (p *PrepareCmd) SetFlags(f *flag.FlagSet) {
false,
"[Deprecated] THIS OPTION WAS REMOVED FOR SECURITY REASONS. Define NOPASSWD in /etc/sudoers on target servers and use SSH key-based authentication",
)

f.BoolVar(
&p.sshExternal,
"ssh-external",
false,
"Use external ssh command. Default: Use the Go native implementation")

}

// Execute execute
Expand Down Expand Up @@ -133,6 +143,7 @@ func (p *PrepareCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{
}

c.Conf.Debug = p.debug
c.Conf.SSHExternal = p.sshExternal

// Set up custom logger
logger := util.NewCustomLogger(c.ServerInfo{})
Expand Down

0 comments on commit 234e312

Please sign in to comment.