Issue #3226 has been updated by Thomas Bellman.

> Does your binary data include leading or trailing whitespace?

When I look at the blobs I have now, they don't seem to do.  However,
this is a proprietary file format with no public specification of
(that I know of), so I don't know if it *can*.  I certainly see both
printable ASCII and control characters as the last character in the
various blobs I have.

(A bit more background.  This is a file that contains a scrambled
version of the password used by the backup system to connect to the
backup server.  I want that file to be installed by Puppet on the
clients after I re-install a machine.  However, the backup system
automatically changes the password at regular intervals, and then
changes the file on the client "behind my back", so I can't just
store a static copy of the file on the Puppet master.  So what I
do is that I have a custom fact containing the contents of this
file, and a custom function that stores a copy of it on the Puppet
master.  And my Puppet manifests only write this file on the clients
if they don't already have such a file [using replce=>false].)

> Doesn't that send you bonkers if so? :)

I suppose I could Base64-encode it before sending it as a fact,
and decode it on the server.  But it seems to have worked for
me so far without doing it. :-)

> My gut feeling is that it's reasonable for the base Facter
> distribution to strip whitespace in the included facts, but
> that it shouldn't be enforced on all custom facts, or there
> should be simple functionality to override it if it is enforced.

That sounds good to me.
----------------------------------------
Bug #3226: Facter not stripping trailing whitespace in at least the productname 
fact
http://projects.reductivelabs.com/issues/3226

Author: Andrew Pollock
Status: Unreviewed
Priority: Normal
Assigned to: 
Category: 
Target version: 1.5.4
Keywords: 
Branch: 


irb(main):001:0> require 'facter'
=> true
irb(main):002:0> require 'pp'
=> true
irb(main):003:0> facts = Facter.to_hash
[REDACTED]
irb(main):004:0> facts['productname']
=> "Precision WorkStation T3400  "


-- 
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://reductivelabs.com/redmine/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