fix: выход если ошибка в Ansible
This commit is contained in:
@@ -21,7 +21,7 @@ var (
|
|||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "playbookctl",
|
Use: "playbookctl",
|
||||||
Short: "Ansible Playbook Dedic2 Control",
|
Short: "Ansible Playbook Dedic2 Control",
|
||||||
Version: "4.0",
|
Version: "4.0.1",
|
||||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||||
return cmd.Help()
|
return cmd.Help()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -44,7 +44,10 @@ func (app *SpaceWorker) Backup(generateOnly bool, targetHost string, roles ...st
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.log.Debug(fmt.Sprintf("ansible command line: %s", command.Args))
|
app.log.Debug(fmt.Sprintf("ansible command line: %s", command.Args))
|
||||||
_ = command.Run()
|
err = command.Run()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
app.log.Info("Download Files")
|
app.log.Info("Download Files")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user