Sha256: 6a16928162b708cfc75f4229f535b13526d2b29ef14d15cf0644a0fa0208cc61
Contents?: true
Size: 1.2 KB
Versions: 2
Compression:
Stored size: 1.2 KB
Contents
# $Id: casestatement.pp 976 2006-03-03 22:23:00Z luke $ $var = "value" case $var { "nope": { file { "/tmp/fakefile": mode => 644, ensure => file } } "value": { file { "/tmp/existsfile": mode => 755, ensure => file } } } $ovar = "yayness" case $ovar { "fooness": { file { "/tmp/nostillexistsfile": mode => 644, ensure => file } } "booness", "yayness": { case $var { "nep": { file { "/tmp/noexistsfile": mode => 644, ensure => file } } "value": { file { "/tmp/existsfile2": mode => 755, ensure => file } } } } } case $ovar { "fooness": { file { "/tmp/nostillexistsfile": mode => 644, ensure => file } } default: { file { "/tmp/existsfile3": mode => 755, ensure => file } } } $bool = true case $bool { true: { file { "/tmp/existsfile4": mode => 755, ensure => file } } } $yay = yay $a = yay $b = boo case $yay { $a: { file { "/tmp/existsfile5": mode => 755, ensure => file } } $b: { file { "/tmp/existsfile5": mode => 644, ensure => file } } default: { file { "/tmp/existsfile5": mode => 711, ensure => file } } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.18.4 | examples/code/snippets/casestatement.pp |
puppet-0.16.0 | examples/code/snippets/casestatement.pp |