This message was deleted.
# forge-modules
s
This message was deleted.
b
I don't know out of my head if that's a bug. but I recommend not using ensure_packages()
instead properly structure your code
j
Is this bad practice? We've been using hiera to scope packages to different sets of hosts for years. I'm not sure how else we would achieve this in our environment
b
have a hash or array in hiera, and in puppet iterate on it and call the package resource or pass the array to the package resource directly
j
Thanks I'll have a look at that.
👍 1
r
Also the empty hash in yaml is not
snap-store:
it is
snap-store: {}
b
I'm quite sure both are valid in some yaml spec versions
I've seen
snap-store:
a lot
(I don't like it)
r
it's ambiguous because it could be an empty array or an empty scalar
b
yep
r
I agree with getting away from ensure_resources(), but in the short term adding
{}
is the quickest fix to get your code running without refactoring the whole thing. You're surely going to have to refactor some of the code for that big jump, but ^^ isn't it. Get that in a second pass.