Robert
2014-May-31 00:15 UTC
[Puppet Users] future parser changes undef to string inside create_resources (tested on puppet 3.5.1 and puppet 3.6.1)
I've stumbled upon this very annoying bug with the future parser where it's replacing undef with empty strings when passed inside a hash to create_resources(). test.pp ========define test($var = undef) { notice inline_template("<%= @name %> is <% if @var %>true<% else %>false<% end %> and of type <%= @var.class %>") } $config = { "from_create_resources" => { var => undef } } create_resources('test', $config) ======== $ puppet apply ./test.pp Notice: Scope(Test[from_create_resources]): from_create_resources is false and of type NilClass $ puppet apply --parser future ./test.pp Notice: Scope(Test[from_create_resources]): from_create_resources is true and of type String Breaks most of my templates since I use <% if @var %> everywhere... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f943395e-81a5-48f2-a2d8-c2ebe5ae3ef1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.