You do not *have* to quote strings however I have ran into issues with hiera 
turning strings that look like integers into an integer which causes problems 
when you attempt to do a key lookup using a string value or pass a value to a 
parameter that expects a string value.

For example, there is a difference between this:

signing_keys:
    epel: '7':
        key_name: foo 


And this:

signing_keys:
    epel: 7:
        key_name: foo

The latter causes the value for signingkeys['epel'] to be converted into an 
integer instead of a string.  This can cause issues with puppet depending 
on how you reference the data.


On Thursday, September 28, 2017 at 12:44:05 PM UTC-4, Georg Faerber wrote:
>
> Hi all, 
>
> Searching the Internets didn't reveal anything: Is there some style 
> guide or best practice regarding syntax used in hiera, writing .yaml 
> files? For example, should it be: 
>
> array: 
>   - string 
>   - string 
>
> or 
>
> array: 
>   - 'string' 
>   - 'string' 
>
> Thanks in advance, 
> all the best, 
> Georg 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/300854eb-2727-4299-93ec-189fae953ddf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to