1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 23:34:57 +00:00

Sync with libcompose

This commit is contained in:
Josh Curl
2016-05-23 17:21:28 -07:00
parent 448f12acb1
commit 42e48476e7
17 changed files with 278 additions and 182 deletions

View File

@@ -7,7 +7,6 @@ import (
"strings"
log "github.com/Sirupsen/logrus"
"github.com/docker/libcompose/project"
"github.com/rancher/docker-from-scratch"
"github.com/rancher/os/compose"
"github.com/rancher/os/config"
@@ -21,7 +20,7 @@ func autoformat(cfg *config.CloudConfig) (*config.CloudConfig, error) {
AUTOFORMAT := "AUTOFORMAT=" + strings.Join(cfg.Rancher.State.Autoformat, " ")
FORMATZERO := "FORMATZERO=" + fmt.Sprint(cfg.Rancher.State.FormatZero)
t := *cfg
t.Rancher.Autoformat["autoformat"].Environment = project.NewMaporEqualSlice([]string{AUTOFORMAT, FORMATZERO})
t.Rancher.Autoformat["autoformat"].Environment = []string{AUTOFORMAT, FORMATZERO}
log.Info("Running Autoformat services")
_, err := compose.RunServiceSet("autoformat", &t, t.Rancher.Autoformat)
return &t, err