Skip to content

Instantly share code, notes, and snippets.

@fiddyspence
Created August 3, 2015 15:19
Show Gist options
  • Save fiddyspence/abe7f4718566ee80693b to your computer and use it in GitHub Desktop.
Save fiddyspence/abe7f4718566ee80693b to your computer and use it in GitHub Desktop.
spenceware:~ fids$ puppet --version
4.2.1
spenceware:~ fids$ cat test.pp
define include($exclude=[]) {
if !($name in $exclude) {
include $name
}
}
$include = ["one", "two", "three", "four"]
$exclude = ["two", "three"]
include{$include: exclude => $exclude}
class one {}
class two {}
class three {}
class four {}
spenceware:~ fids$ puppet apply test.pp
Notice: Compiled catalog for spenceware.amers2.ciscloud in environment production in 0.75 seconds
Notice: Applied catalog in 0.02 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment