diff --git a/pkg/templater/packages.go b/pkg/templater/packages.go index c5b6d22..3a289e4 100644 --- a/pkg/templater/packages.go +++ b/pkg/templater/packages.go @@ -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) diff --git a/pkg/templater/services.go b/pkg/templater/services.go index 09455a8..cf968bb 100644 --- a/pkg/templater/services.go +++ b/pkg/templater/services.go @@ -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)