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 {
|
func (s *Service) Manage(templateDir string, rootDir string) error {
|
||||||
// Manage packages repositories
|
// Manage packages repositories
|
||||||
log.Print("Managing package repositories")
|
log.Print(" Managing package repositories")
|
||||||
err := s.manageRepos(s.Repos)
|
err := s.manageRepos(s.Repos)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create system users
|
// Create system users
|
||||||
log.Print("Managing system users")
|
log.Print(" Managing system users")
|
||||||
for _, user := range s.Users {
|
for _, user := range s.Users {
|
||||||
err := user.Manage()
|
err := user.Manage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -59,7 +59,7 @@ func (s *Service) Manage(templateDir string, rootDir string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manage system packages
|
// Manage system packages
|
||||||
log.Print("Installing packages")
|
log.Print(" Installing packages")
|
||||||
for _, pack := range s.Packages {
|
for _, pack := range s.Packages {
|
||||||
err := pack.Manage()
|
err := pack.Manage()
|
||||||
if err != nil {
|
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.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)
|
err = processConfigFiles(s.ConfigFiles, s.Vars, templateDir, rootDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("ProcessingTemplatesFailed with error: %v", err)
|
return fmt.Errorf("ProcessingTemplatesFailed with error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Print("Managing services:\n")
|
log.Print(" Managing services:\n")
|
||||||
for _, daemon := range s.Daemons {
|
for _, daemon := range s.Daemons {
|
||||||
err = daemon.Manage()
|
err = daemon.Manage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue