fix: хост по-умолчанию
This commit is contained in:
@@ -72,5 +72,16 @@ func restoreRunE(_ *cobra.Command, args []string) error {
|
||||
spaceWorker := space_worker.NewSpaceWorker(logger.LogVerbose(flagVerbose), workDir)
|
||||
spaceWorker.AnsibleBin = flagAnsibleBin
|
||||
spaceWorker.AnsibleVerbose = flagAnsibleVerbose
|
||||
return spaceWorker.Restore(flagTargetHost, flagRestoreTimestamp, flagRestoreInventory, args...)
|
||||
|
||||
var restoreInventory string
|
||||
if flagRestoreInventory != "" {
|
||||
restoreInventory = flagRestoreInventory
|
||||
} else {
|
||||
restoreInventory, err = spaceWorker.GetDefaultHost()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return spaceWorker.Restore(flagTargetHost, flagRestoreTimestamp, restoreInventory, args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user