root@precise64:~ # puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", Debian => "upper case", debian => "lower case",} notify{"Result: ${case}":}'
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.07 seconds
Notice: Result: upper case
Notice: /Stage[main]//Notify[Result: upper case]/message: defined ' message' as ' Result: upper case'
Notice: Finished catalog run in 0.05 seconds
root@precise64:~ # puppet apply -e ' $case = $::osfamily ? { somethingelse => "FNORD", debian => "L case", Debian => "U case",} notify{"Result: ${case}":}'
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.06 seconds
Notice: Result: L case
Notice: /Stage[main]//Notify[Result: L case]/message: defined ' message' as ' Result: L case'
Notice: Finished catalog run in 0.04 seconds
root@precise64:~ # puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", Debian => "upper case", debian => "lower case",} notify{"Result: ${case}":}' --parser future
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.53 seconds
Notice: Result: upper case
Notice: /Stage[main]//Notify[Result: upper case]/message: defined ' message' as ' Result: upper case'
Notice: Finished catalog run in 0.05 seconds
root@precise64:~ # puppet apply -e ' $case = $::osfamily ? { somethingelse => "FNORD", debian => "L case", Debian => "U case",} notify{"Result: ${case}":}' --parser future
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.34 seconds
Notice: Result: L case
Notice: /Stage[main]//Notify[Result: L case]/message: defined ' message' as ' Result: L case'
Notice: Finished catalog run in 0.04 seconds
root@precise64:~ # puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", Debian => "upper case", debian => "lower case",} notify{"Result: ${case}":}' --parser future
Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
(at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1095:in ` issue_deprecations' )
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.51 seconds
Notice: Result: lower case
Notice: /Stage[main]/Main/Notify[Result: lower case]/message: defined ' message' as ' Result: lower case'
Notice: Finished catalog run in 0.02 seconds
root@precise64:~# puppet apply -e ' $case = $::osfamily ? { somethingelse => " FNORD" , debian => " L case" , Debian => " U case" ,} notify{" Result: ${case} " :}' --parser future
Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
(at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1095:in `issue_deprecations' )
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.37 seconds
Notice: Result: L case
Notice: /Stage[main]/Main/Notify[Result: L case]/message: defined ' message' as ' Result: L case'
Notice: Finished catalog run in 0.03 seconds
additional tests (whether upper case is matched)
root@precise64:~ # puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", Debian => "U case",} notify{"Result: ${case}":}' --parser future
Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
(at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1095:in ` issue_deprecations' )
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.37 seconds
Notice: Result:
Notice: /Stage[main]/Main/Notify[Result: ]/message: defined ' message' as ' Result: '
Notice: Finished catalog run in 0.02 seconds
root@precise64:~ # facter --puppet | grep -i osfam
osfamily => Debian
root@precise64:~ #