Skip to content

Instantly share code, notes, and snippets.

@masterzen
Created February 1, 2010 12:52
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 masterzen/291671 to your computer and use it in GitHub Desktop.
Save masterzen/291671 to your computer and use it in GitHub Desktop.
class file_filler {
define filled_file($content='') {
file { $name: }
case $content {
'': { File[$name] { content => "I was filled\n" } }
default: { File[$name] { content => $content }
}
}
filled_file { ["/tmp/a", "/tmp/b"]: }
}
class test {
include file_filler
}
include test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment