On 09/17/2015 05:24 PM, Matthaus Owens wrote:
Stack,
[snip]Stack,
BTW: the doc's actual JSON example is broken as it is missing the [ ] around
it. I included it. below and if you don't you fail the parser and Hiera just
ignores everything instead of giving an error.
Adding [ ] around your json is what is causing the problem you'reit. I included it. below and if you don't you fail the parser and Hiera just
ignores everything instead of giving an error.
seeing. It turns the data you are writing into an Array instead of a
Hash. Hiera is expecting it to be a hash, as the error message
indicates. The error message here may not be very helpful though,
because the data isn't a string, but is an Array. What parse error do
you get without the [ ]?
I was able to get a correct return from hiera by removing the [ ].
comparing against the output I got from that other program and I see how
and why it is wrapping it with [] now. Plus the example I was told to
use to verify the JSON output was "jq[0]". 15 seconds on the jq tutorial
website shows why that is broken. Some how that fact just didn't click
in my head. Duh.
On the other hand, scrolling back through my terminal history I see the
pre-[] testing where hiera simply just didn't print anything or returned
nil. I am failing to see the difference between then and now...My guess
is that I had another hiera error, and in my struggles for fixing this
issue, I fixed that one...but I'm not 100% on that...
On the bright side, it is all working now!! :-)
I must be dense or have done something to make Hiera not like me. It
seems we brawl for a long time, then suddenly everything starts
working... :-D
Thank you so much for pointing out my silly goof up. I really REALLY
appreciate the second pair of eyes pointing out my mistake.
~Stack~
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/55FB4568.6070302%40gmail.com.
For more options, visit https://groups.google.com/d/optout.