On Wednesday, April 18, 2018 at 3:23:31 AM UTC-5, MartinW wrote: > > Hi > > I have some hiera yaml that looks like this: > > vars: > psuName: xxxxx > liveCustomers: 100 > notes: some notes here (more info in backets) > uplink: uplink01 > > The yaml is autogenerated by a script and it is basically used to help > build icinga2 config. The problem I have is that the output looks like this > in the config file: > > vars.psuName = "xxxxx" > vars.liveCustomers = 100 > vars.notes = some notes here ("more info in backets") > vars.uplink = "uplink01" > > So puppet has put quotes around most fields which is what I want, but on > the notes field it has put quotes only around the text inside the bracket, > I want it to look like this: > > vars.notes = "some notes here (more info in backets)" > > I have tried changing the hiera yaml to look like this: > > notes: "some notes here (more info in backets)" > > but it makes no difference. > > Any ideas? >
Puppet itself is not responsible for adding the quotes to the target file. That's being done by whatever template or other mechanism you specified and provided for it to use to generate the content of that file. Puppet just supplies your input data to that function or template (as a Hash, it appears, but not raw text in any case), and receives the result, which it records literally in the target file. I do recommend that you take care with how you generate the Hiera data. Use a YAML-specific tool, and twiddle its dials to get the most conservative output style it is willing to produce. For instance, I'm surprised that your notes data is not already being presented quoted. But that's to protect you from future issues, not to fix your present one. John -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f43a4f73-cf9c-4dbd-8cbe-7378cd1d129a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.