Archived
1

fix: выход если ошибка в Ansible

This commit is contained in:
2025-01-19 14:42:31 +03:00
parent b514cc36fb
commit b174d10f20
2 changed files with 5 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ var (
var rootCmd = &cobra.Command{
Use: "playbookctl",
Short: "Ansible Playbook Dedic2 Control",
Version: "4.0",
Version: "4.0.1",
RunE: func(cmd *cobra.Command, _ []string) error {
return cmd.Help()
},

View File

@@ -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))
_ = command.Run()
err = command.Run()
if err != nil {
return err
}
app.log.Info("Download Files")