Created
February 17, 2014 10:36
-
-
Save fiddyspence/9048311 to your computer and use it in GitHub Desktop.
contain with a parameterised class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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