v0.3.0
* Getting environment variables and passwords from Vault (not tested yet) * Vault configuration to config (not tested yet) * Ability to run scripts from file on local machine on the remote host * Ability to get ouput in the notification of a list for individual commands or all commands * Make SSH connections close after all commands have been run; reuse previous connections if needed
This commit is contained in:
@ -12,9 +12,9 @@ import (
|
||||
|
||||
var (
|
||||
backupCmd = &cobra.Command{
|
||||
Use: "backup [--lists=list1,list2]",
|
||||
Use: "backup [--lists=list1,list2,... | -l list1, list2,...]",
|
||||
Short: "Runs commands defined in config file.",
|
||||
Long: "Backup executes commands defined in config file.\nUse the --lists flag to execute the specified commands. If not specified, all lists will be executed.",
|
||||
Long: "Backup executes commands defined in config file.\nUse the --lists or -l flag to execute the specified lists. If not flag is not given, all lists will be executed.",
|
||||
Run: Backup,
|
||||
}
|
||||
)
|
||||
@ -34,7 +34,7 @@ func Backup(cmd *cobra.Command, args []string) {
|
||||
|
||||
config := backy.ReadConfig(backyConfOpts)
|
||||
|
||||
config.RunBackyConfig("", backyConfOpts)
|
||||
config.RunListConfig("", backyConfOpts)
|
||||
for _, host := range config.Hosts {
|
||||
if host.SshClient != nil {
|
||||
host.SshClient.Close()
|
||||
|
Reference in New Issue
Block a user