"hide successful, non-trigger commands with no output from host changes listing")
optionLog := flag.String("log", "info", "set log `level`; "+
"levels: error, info, verbose, debug, debug2, debug3")
+ optionSshConfig := flag.String("sshconfig", "",
+ "`path` to ssh configuration file; used for tests")
flag.CommandLine.Parse(args[2:])
cfg.DryRun = *optionDryRun
cfg.Quiet = *optionQuiet
cfg.LogLevel = level
+ cfg.SshConfig = *optionSshConfig
toSync, err := hostsToSync(names, allHosts, allGroups)
if err != nil {
}()
// Connect to remote host
- err := conn.DialSSH(s.host.SshUser, s.host.Name)
+ err := conn.DialSSH(s.host.SshUser, s.host.Name, s.config.SshConfig)
if err != nil {
return err
}