"Error: Could not render to rich_data_json" when pushing binary file to host

asked 2018-09-28 09:05:44 -0600

2Wheels gravatar image

I just installed a new host which is installed with puppet 6.0.0

Next to that I use a puppet server with foreman, which started with Foreman 1.12/puppet 4 and is now upgraded to Foreman 1.19/puppet 5.5.6

I have one module, which installs a C-compiled file on a server, using the following code :

file { 'super-handy-tool':
  path    => "/some/dir/on/system/handy-tool",
  ensure  => file,
  content => file("my_module/handy-tool"),
  owner   => 'root',
  group   => 'root',
  mode    => '4755',

When I run the "puppet agent -t" on the host, I get the following output :

Info: Using configured environment 'production' 
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for my.host.local
Info: Unable to serialize catalog to json, retrying with pson
Error: Could not render to rich_data_json: source sequence is illegal/malformed utf-8
Info: Applying configuration version '1538142357'

I did try to change the "ensure => file" to "ensure => present", but this did not solve the error.

Does anyone have an idea get rid of this error ?

edit retag flag offensive close merge delete