hash2yaml to return an empty string

asked 2018-01-24 08:39:35 -0500

jenniferbeckingham gravatar image

updated 2018-01-24 08:39:43 -0500

I would like a variable in my paramters.yml file to be empty, that is

value:

I am using hash2yaml to convert my hiera file into the config parameters.yml file, and I can't find a solution to get the final variable to be an empty string. I have tried the following:

hiera: value: result: value: undef

hiera: value: null result: value: undef

hiera: value: nil result: value: nil

hiera: value: '' result: value: ''

Any help would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

What do you mean by "empty" ? It has not have a data type - an empty string '' and empty array [], or an empty hash { } ? The data type nil exists in ruby, in the puppet language that is the same as undef. That means "has no value" - which is not the same as being "empty"

Henrik Lindberg gravatar imageHenrik Lindberg ( 2018-02-04 04:18:12 -0500 )edit