-
Notifications
You must be signed in to change notification settings - Fork 5
/
apply
executable file
·37 lines (30 loc) · 985 Bytes
/
apply
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
#!/bin/sh
# Example configuration on how to apply default, host, and module specific configuration
./gone apply ${@:-defaults conf/defaults host/$(hostname -f) modules/gonemock}
# Gone does not define how you structure your data, so instead
# if you would like to group hosts by their domain name you could write:
#
# ./gone apply ${@:-defaults host/$(dnsdomain)/$(hostname)}
#
# The above will give allow you to have a catalog `host/` where
# applicances are named `<domain>/<host>`
#
# Adding a general 'role based' model is also straightforward,
# there are two approaches, put everything in your ./apply file
# and do a case "$host" in .....:
## case "$(hostname)" in
## db-*) role=db-server ;;
## app-*) role=app-server ;;
## esac
#
## gone apply defaults host/$(hostname) role/$role
#
# Or you can run the default gone and recursively apply from your host
# appliance:
#
## Your host/$(hostname) applicance:
## #!/bin/sh
##
## gone apply role/my-role
#
## gone apply