Could not evaluate manifest: invalid byte sequence for brace characters

asked 2015-07-21 12:39:44 -0600

Henning gravatar image

  • Master: Puppet 3.8.1 on Ubuntu 14.04
  • Agent: Windows 7
  • Related modules: puppetlabs/registry

I'm trying to use puppet to update a registry value using the puppetlabs/registry module, but it seems to have some issues when the brace character is part of the key.

registry_value { 'SCE Publishing Tools Registry Fix':
    path     => 'HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{52D53B6F-12A6-4CCD-AAE1-F0052FE31C20}\DisplayName',
    ensure   => present,
    data     => 'SCE Publishing Tools for PlayStation4 v1.93.0.4130',

Which fails with the error message

←[mNotice: /Stage[main]/Main/Node[rkvtest02]/Package[SCE Publishing Tools for PlayStation4 v1.93.0.4130]/ensure: created←[0m←[1;31mError: /Stage[main]/Main/Node[]/Registry_value[SCE Publishing Tools Registry Fix]: Could not evaluate: invalid byte sequence in UTF-8←[0m

If I remove the product code GUID and try to manage DisplayName in the Uninstall key things work, so it seems to be specifically related to the brace characters { and } in my manifest.

Things I've tried for the path value:

  • Single quotes, no modification
  • Single quotes, escape braces (e.g. \{ and \})
  • Double quotes, no modification
  • Double quotes, escape backslashes with additional backslash (e.g. HKLM\\SOFTWARE\\...)
  • Double quotes, escape backslashes and escape brace characters

But it will either show the 'Could not evaluate' error from above or a 'Munging failed for value' error. Using --trace didn't seem to turn up anything relevant to the errors.

My /usr/share/puppet/rack/puppetmasterd/ has Encoding.defaultexternal = Encoding::UTF8 at the top, my manifest is UTF-8 w/o BOM according to Notepad++ and file, and the locale of the Ubuntu server is en_US.UTF-8.

Any recommendations for other things to try?

edit retag flag offensive close merge delete