This is a giant refactor to move functions into a hierarchial module layout. While this isn't entirely implemented yet, it should work correctly once all the import bits have landed. What's broken at the moment is the template function, which currently doesn't understand the period separator.
21 lines
543 B
Plaintext
21 lines
543 B
Plaintext
import "sys"
|
|
|
|
# here are all the possible options:
|
|
#$opts = struct{strategy => "rr", max => 3, reuse => false, ttl => 10,}
|
|
|
|
# although an empty struct is valid too:
|
|
#$opts = struct{}
|
|
|
|
# we'll just use a smaller subset today:
|
|
$opts = struct{strategy => "rr", max => 2, ttl => 10,}
|
|
|
|
# schedule in a particular namespace with options:
|
|
$set = schedule("xsched", $opts)
|
|
|
|
# and if you want, you can omit the options entirely:
|
|
#$set = schedule("xsched")
|
|
|
|
file "/tmp/mgmt/scheduled-${sys.hostname()}" {
|
|
content => template("set: {{ . }}\n", $set),
|
|
}
|