Closed ccampanale closed 8 years ago
Hm that sounds interesting - can you show me an example of another module doing this so I have some basis to compare?
Sure thing!
Check out @solarkennedy's Consul module. You can see how he includes hashes in his init.pp that are later checked and if defined uses create_resources()
for those types.
This seems to be the direction that a lot of modules have taken as it help to support declaration directly from hiera as well as utilization via puppetcode (in the event the organization decides a role/profile type wrapper is necessary). For our purposes, a wrapper isn't entirely necessary but including this functionality would be fantastic and solidify this!
Let me know what you think.
Heh that's funny - I based this module wholly on solarkennedy's consul module before he refactored it to use newer patterns - I'll give the init.pp
setup a look and see if it can be integrated without too much pain.
Give master
a go and let me know? :)
Sweeeet! When I get a chance I'll VPN in and take the change for a ride and report back! Looks like it should do the trick though! :smile:
Fingers crossed - I'll close this issue - feel free to reopen it if there are problems.
Great work on this module (sorry I've never mentioned this before now...)!
I am currently using this module directly from hiera which is great for me as I don't need to write and maintain a wrapper/profile for it. One downside is that I cannot use the defined types directly through hiera (unless I am missing something) so I am using some trickery to get a template defined in my startup script.
What I would like to request is that this module's defined types are made accessible through the init.pp class. I've implemented this myself (and seen it done elsewhere) simply by including a parameter that is to be a hash of types which is later verified and passed to
create_resources('type', $hash)
. This would greatly simplify usingconsul_template::watch:
for anyone using this module directly from hiera!Please let me know if you have any questions or again, if I am missing something.
Thanks again!