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.
This commit is contained in:
18
examples/lang/edges1.mcl
Normal file
18
examples/lang/edges1.mcl
Normal file
@@ -0,0 +1,18 @@
|
||||
$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",
|
||||
}
|
||||
Reference in New Issue
Block a user