Issue #4561 has been updated by Walter Heck.

Wanted to add this to #3704, but that has been closed as a duplicate of this. 
On the geppetto mailing list the following problem popped up, which I think is 
particularly painful:
<pre>
It seems all references to "false" and "true" trigger a warning in geppetto.  
Since "true" != true and "false" != false this should probably be removed ( but 
I think is why it was added also ;)

The primary issue is that all facts that are true/false are "true"/"false" in 
recipes.  I also have some goofy exec resources where 'command => "true"' which 
flags a warning.

Example:

Some test code:

  if $::is_virtual == false {
    notify{ 'a': }
  } else {
    notify{ 'b': }
  }
  if $::is_virtual == "false" {
    notify{ 'c': }
  } else {
    notify{ 'd': }
  }

On a system:
# facter -p | grep is_virtual
is_virtual => false
# puppet agent --test | grep -i notify
notice: /Stage[main]/Common/Notify[b]/message: defined 'message' as 'b'
notice: /Stage[main]/Common/Notify[c]/message: defined 'message' as 'c'
</pre>
----------------------------------------
Feature #4561: Structured data should be supported
https://projects.puppetlabs.com/issues/4561#change-57404

Author: Luke Kanies
Status: Accepted
Priority: High
Assignee: Ken Barber
Category: library
Target version: 
Keywords: 
Branch: 
https://github.com/kbarber/facter/tree/ticket/master/4561-add_structured_data
Affected Facter version: 


Facter currently only supports a flat result list, and it should instead 
support structured data - basically, a hash of hashes and arrays.

This should probably be able to be represented in two ways - either a hash of 
hashes/arrays, or namespaces.  That is, this:
<pre>
{:top => {:middle => {:bottom => "value"}}}
</pre>
Could also be represented as:
<pre>
top::middle::bottom = value
</pre>

We could optionally have a converter that s/::/_/g for backward compatibility, 
which should be both trivial and unnecessary, but there should definitely be 
some kind of backward compatibility mode for callers who can't deal with 
structured data.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to