Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class { 'mikey':
- foobar => yes,
- }
- class mikey ($foobar = $mikey::params::foobar) inherits mikey::params {
- notice("foobar is $foobar")
- if ! ($foobar in [ 'yes', 'no' ]) {
- fail("\"${foobar}\" is not a valid foobar parameter value")
- }
- file { '/tmp/mikey':
- ensure => present,
- content => template('mikey.erb'),
- }
- }
- class mikey::params {
- $foobar = $foobar ? {
- yes => 'yes',
- no => 'no',
- default => 'no',
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement