Issue #5261 has been updated by Nigel Kersten.
We think we've taken a much better approach now that should work in most situations. https://github.com/jes5199/puppet/tree/ticket/2.6.x/5261 is the git branch. If people could have a chance to test that or the commit in next referenced above, that would be brilliant. ---------------------------------------- Bug #5261: Need a way to transmit binary data for file contents in manifests https://projects.puppetlabs.com/issues/5261 Author: Chris May Status: Available In Testing Branch Priority: High Assignee: Paul Berry Category: Target version: Affected Puppet version: Keywords: Branch: https://github.com/jes5199/puppet/tree/ticket/2.6.x/5261 In puppet 0.25.x and up (i.e. any configuration that uses the ReST API), it does not appear possible to supply arbitrary binary data in the "content" attribute of a file resource. For example, doing this <pre> file{"/path/to/key.jks": content=>file("/secrets/key.jks") } </pre> will fail if /secrets/key.jks contains any non-UTF-8 characters. Depending on the specific version, the error will be something like <pre> Could not render to pson: Caught Iconv::IllegalSequence: "\355\262\225" </pre> or <pre> Could not render to pson: invalid utf8 byte: '\176' </pre> This issue was discussed in http://projects.puppetlabs.com/issues/4832, in which Felix Frank said "So there’s a design decision after all: If PSON is to be JSON compatible – no binary data.". I take this to mean that content=>file() is not intended to be used with non-UTF-8 data. In that case, would it be possible to have an alternative, binary-safe version of file() (or a binary-content attribute for the file resource) which could base-64 encode content before transmission, and decode it on the client? There's some further discussion on the puppet-users group here:http://groups.google.com/group/puppet-users/browse_thread/thread/194625e4e453ecb4 -- 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.
