Try 07
This commit is contained in:
parent
f9ca921f55
commit
e116958fe3
|
@ -43,14 +43,14 @@ func (s *Service) manageRepos(repos map[string]Repository) error {
|
|||
|
||||
func (s *Service) Manage(templateDir string, rootDir string) error {
|
||||
// Manage packages repositories
|
||||
log.Print("Managing package repositories")
|
||||
log.Print(" Managing package repositories")
|
||||
err := s.manageRepos(s.Repos)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Create system users
|
||||
log.Print("Managing system users")
|
||||
log.Print(" Managing system users")
|
||||
for _, user := range s.Users {
|
||||
err := user.Manage()
|
||||
if err != nil {
|
||||
|
@ -59,7 +59,7 @@ func (s *Service) Manage(templateDir string, rootDir string) error {
|
|||
}
|
||||
|
||||
// Manage system packages
|
||||
log.Print("Installing packages")
|
||||
log.Print(" Installing packages")
|
||||
for _, pack := range s.Packages {
|
||||
err := pack.Manage()
|
||||
if err != nil {
|
||||
|
@ -68,13 +68,13 @@ func (s *Service) Manage(templateDir string, rootDir string) error {
|
|||
log.Printf("\tPackage %s installed\n", pack.Name)
|
||||
}
|
||||
|
||||
log.Print("Generating configuration files\n")
|
||||
log.Print(" Generating configuration files\n")
|
||||
err = processConfigFiles(s.ConfigFiles, s.Vars, templateDir, rootDir)
|
||||
if err != nil {
|
||||
return fmt.Errorf("ProcessingTemplatesFailed with error: %v", err)
|
||||
}
|
||||
|
||||
log.Print("Managing services:\n")
|
||||
log.Print(" Managing services:\n")
|
||||
for _, daemon := range s.Daemons {
|
||||
err = daemon.Manage()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue