Kafo wizard: input a hash

Problem:

We’re using kafo 2.1.0 from gem to build an installer. In a class we’re using a hash datatype, which by default is empty. I’d like the user to be able to specify a value for this hash, like

hosts_entries:
’1.2.3.4’:

So a key and an array of values.

If I put this in the answer file directly, it works fine, but I cannot figure out how to input it correctly in the wizard. It does not work to put the hash as a lines of key:value pairs, as the wizard instructs. It always ends up funny, like cutting the ”key” before the first dot. I’m looking at the code, but could not yet find where this goes wrong, or how to input the hash correctly.

Expected outcome:

Input the hash as lines of key:value and it’s stored correctly in the answer file.

Foreman and Proxy versions:

kafo 2.1.0 as a puppet gem

Foreman and Proxy plugin versions:

Other relevant data:

  • Centos7 updated to the latest
  • Vagrant machine

I suspect it doesn’t know how to handle (in Puppet 4 types) a Hash[String, Array[String]], just a Hash[String, String]. I think this is the relevant code:

Maybe you need a workaround in you Puppet code. For example accept 1.2.3.4:puppet.example.com,puppet and split on commas inside Puppet.

Thanks for helping.

Inputting 1.2.3.4:puppet.example.com (string, string, quotes or not also goes funny. I’ll try to take another look now when I know where to look.

I think I can work around by accepting an array of strings and use indexing. Then convert these to a hash.

Should this actually be fixed?