Skip to content

Instantly share code, notes, and snippets.

@fiddyspence
Created February 17, 2014 10:36
Show Gist options
  • Save fiddyspence/9048311 to your computer and use it in GitHub Desktop.
Save fiddyspence/9048311 to your computer and use it in GitHub Desktop.
contain with a parameterised class
[root@master2 ~]# puppet apply foo.pp
Notice: Compiled catalog for master2 in environment production in 0.24 seconds
Notice: sdkjfbkjsbd
Notice: /Stage[main]/Bar/Notify[sdkjfbkjsbd]/message: defined 'message' as 'sdkjfbkjsbd'
Notice: /Stage[main]/Foo/File[/tmp/file]/ensure: defined content as '{md5}d111ae55ded9fb2cd63c590d1d0b1b30'
Notice: Finished catalog run in 0.46 seconds
[root@master2 ~]# cat foo.pp
class foo ($content) {
file{ '/tmp/file':
content => $content,
}
}
class bar {
notify { 'sdkjfbkjsbd': }
contain foo
}
class { 'foo':
content => 'sdfklnsdlf',
}
include bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment