Files
mgmt/examples/lang/edges1.mcl
James Shubin 3ad7097c8a lang: Add internal, resource specific edges
This adds the ability to specify internal, resource specific edges, with
and without notifications. We use the special words: "Notify", "Before",
"Listen", and "Depend". They must have the first character capitalized.
They also support the "elvis" operator.
2018-02-27 23:26:25 -05:00

19 lines
266 B
Plaintext

$b = true
if $b {
exec "exec0" {
cmd => "sleep 10s",
shell => "/bin/bash",
}
}
exec "exec1" {
cmd => "sleep 10s",
shell => "/bin/bash",
Depend => $b ?: Exec["exec0"],
Before => Exec["exec2"],
}
exec "exec2" {
cmd => "sleep 10s",
shell => "/bin/bash",
}