Ask Your Question

can't convert Hash into String STDLIB file_line [closed]

asked 2017-04-21 06:46:32 -0500


I have this in a class :

    file_line { 'Append a line to /etc/xinetd.d/check_mk':
      path => '/etc/xinetd.d/check_mk',  
      line => '    bind           =',
      match => "bind.*$",

It work's perfectly on puppet --version ==> 3.8.7 in a debian vm, but not in a centos vm , with the same version of puppet. It gave me this error :

Error: /Stage[main]/Snmp::Librenmsagent/Fileline[Append a line to /etc/xinetd.d/check_mk]: Could not evaluate: can't convert Hash into String

Do you know why ?

Thank you !

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ndevouge
close date 2017-04-24 01:30:46.128751

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-24 01:30:23 -0500

I have found the problem, which was not in the puppet / facter verison, but in ruby version. It doesn't work with version < ruby 2.1.0p0 ! So with RVM I have installed this version, rebooted and now everything is working !

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-04-21 06:46:32 -0500

Seen: 57 times

Last updated: Apr 24