Skip to content

Instantly share code, notes, and snippets.

@fadenb
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fadenb/a785f40de0c6c7567928 to your computer and use it in GitHub Desktop.
Save fadenb/a785f40de0c6c7567928 to your computer and use it in GitHub Desktop.
Puppet future parser behavior change

Puppet 3.3.1

normal parser

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

future parser

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

Puppet 3.6.2

future parser

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:~# 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment