-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.go
48 lines (43 loc) · 984 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package main
import (
"flag"
"fmt"
"github.com/prismatik/config/base"
"github.com/prismatik/config/buildkite"
"github.com/prismatik/config/codescreen"
"github.com/prismatik/config/docker"
"github.com/prismatik/config/elastic"
"github.com/prismatik/config/influxdb"
"github.com/prismatik/config/postgres"
"github.com/prismatik/config/rethinkdb"
"github.com/prismatik/config/ufw"
"strings"
)
func main() {
roles := flag.String("role", "base", "A comma separated list of roles to execute on the machine")
flag.Parse()
parsedRoles := strings.Split(*roles, ",")
for _, role := range parsedRoles {
fmt.Println("Executing role", role)
switch role {
case "base":
base.Go()
case "influxdb":
influxdb.Go()
case "postgres":
postgres.Go()
case "rethinkdb":
rethinkdb.Go()
case "ufw":
ufw.Go()
case "codescreen":
codescreen.Go()
case "buildkite":
buildkite.Go()
case "docker":
docker.Go()
case "elastic":
elastic.Go()
}
}
}