Closed mchugh19 closed 11 years ago
In playing around with it, I think it might work better to be space and not comma separated. So I've removed the gsub and changed split(',') to split(' ')
@mchugh19 I've not forgotten about this, just hit some slow-down during the job-change phase. Will get back to you on these ASAP.
Sounds good Tray, good luck!
I was also maybe going to try and convert the http requests into pipelined versions via em-http-request (available in debian). Or seeing if there was a way of grabbing the whole host yaml file and smartvars for caching. But since it works for now, that is on the back burner.
I have noticed since converting some modules to hiera, that occasionally the puppet compile errors from timeout with execution expired messages. I have not looked into it very much yet, but I see it on at least one host a day. So eventually I might need to look into the caching if it turns out to be from the foreman lookups.
Anyway, I'm sure you'll be able to clean this up again. So good luck on the job front and I look forward to seeing your updates
Hey Tray. Think you might be able to do a cleanup and merge of this? Sounds like there is a bit of discussion on the foreman list about hiera integration. As far as I can tell, this completes that :)
Hope job-changing went well!
Refactors to handle arrays. Hash type is untested, but code works for hiera, hiera_include, hiera_array
Foreman variable syntax is simply a comma separated list. Gets returned properly if called by hiera_array
Also fixes cases where smartvar lookup would return an empty set rather than nil.