Skip to content

Instantly share code, notes, and snippets.

@lutter
Created September 17, 2014 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lutter/b60b16f00f04d240c5de to your computer and use it in GitHub Desktop.
Save lutter/b60b16f00f04d240c5de to your computer and use it in GitHub Desktop.
Collection-based dependencies
define echo {
exec { "echo-$name":
command => "/usr/bin/echo $name"
}
}
Foo <| color == 'green' |> -> echo { "yo": } -> Foo <| color == 'red' |>
define foo($color) {
notice("foo[$name]: $color")
echo { "foo-$name-$color": }
}
foo { r1: color => red }
foo { g1: color => green }
foo { g2: color => green }
foo { r2: color => red }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment