Try 07
This commit is contained in:
parent
97f7d28838
commit
767c3856a1
|
@ -2,6 +2,7 @@ package templater
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"runtime"
|
||||
|
||||
"forge.cadoles.com/pcaseiro/templatefile/pkg/utils"
|
||||
|
@ -45,7 +46,7 @@ func (p *SystemPackage) Manage() error {
|
|||
}
|
||||
}
|
||||
|
||||
fmt.Printf("Processing %s package\n", p.Name)
|
||||
log.Printf("\t Installing %s package\n", p.Name)
|
||||
switch os := p.Distribution; os {
|
||||
case "debian", "ubuntu":
|
||||
_, stdErr, pkErr = utils.RunSystemCommand("apt", "install", "-y", p.Name)
|
||||
|
|
|
@ -50,12 +50,13 @@ func (s *Service) Manage(templateDir string) error {
|
|||
}
|
||||
|
||||
// Manage system packages
|
||||
log.Printf("Installing packages:")
|
||||
for _, pack := range s.Packages {
|
||||
err := pack.Manage()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Printf("Package %s installed\n", pack.Name)
|
||||
log.Printf("\tPackage %s installed\n", pack.Name)
|
||||
}
|
||||
|
||||
err = processConfigFiles(s.ConfigFiles, s.Vars, templateDir)
|
||||
|
|
Loading…
Reference in New Issue