Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. class { 'mikey':
  2. foobar => yes,
  3. }
  4.  
  5. class mikey ($foobar = $mikey::params::foobar) inherits mikey::params {
  6. notice("foobar is $foobar")
  7.  
  8. if ! ($foobar in [ 'yes', 'no' ]) {
  9. fail("\"${foobar}\" is not a valid foobar parameter value")
  10. }
  11.  
  12. file { '/tmp/mikey':
  13. ensure => present,
  14. content => template('mikey.erb'),
  15. }
  16. }
  17.  
  18. class mikey::params {
  19. $foobar = $foobar ? {
  20. yes => 'yes',
  21. no => 'no',
  22. default => 'no',
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement