Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "sshrunner", Short: "Sshrunner runs ssh commands across multiple servers", Long: `Sshrunner runs ssh commands across multiple servers For example: $ sshrunner -c "mkdir /tmp/tmpdir" -m 17.2.2.2,17.2.3.2 Makes /tmp/tmpdir in 17.2.2.2 and 17.2.3.2 (It can also take dns names) `, Run: func(cmd *cobra.Command, args []string) { var options []func(*exec.Options) options = append(options, exec.Machines(viper.GetStringSlice("sshrunner.machines"))) options = append(options, exec.User(viper.GetString("sshrunner.user"))) options = append(options, exec.Port(viper.GetInt("sshrunner.port"))) options = append(options, exec.Cmd(viper.GetString("sshrunner.command"))) options = append(options, exec.Key(viper.GetString("sshrunner.key"))) options = append(options, exec.UseAgent(viper.GetBool("sshrunner.useagent"))) exec.Run(options...) }, Version: Version, }
RootCmd Main root initializer command
View Source
var (
Version string
)
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.