Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the gem provider logic from puppet-hiera to extlib #63

Open
rski opened this issue Jun 28, 2016 · 5 comments
Open

Move the gem provider logic from puppet-hiera to extlib #63

rski opened this issue Jun 28, 2016 · 5 comments

Comments

@rski
Copy link
Member

rski commented Jun 28, 2016

I'm working on voxpupuli/puppet-network#168, which requires using the gem provider. As @bastelfreak pointed out, there are more than one gem providers and the correct one needs to be selected. This is already implemented in puppet-hiera:
https://github.com/voxpupuli/puppet-hiera/blob/master/manifests/params.pp
I wouldn't like to just copy this into puppet-network, plus it might be needed again in the future in another module.
So, would it be possible to move it from puppet-hiera to extlib? Is it the right place to move it to or is there a better one instead?

@bastelfreak
Copy link
Member

we've this logic block copy'n pasted into several modules. we should place it here and make a fact out of it?

@ffrank
Copy link

ffrank commented Sep 13, 2016

Can this become a custom function rather than a fact? I'd like to avoid more Ruby code on each and every agent in favor of centralized logic on the master.

@rnelson0
Copy link
Member

I don't think so, because it needs to be evaluated on the agent, not the master.

@ffrank
Copy link

ffrank commented Sep 13, 2016

As far as I can tell, all that's needed from the agent are facts like is_pe, pe_version, or puppetversion. The current implementation does the computation in a params class, which cannot be readily shared between modules. But it happens master-side (in the manifest compiler), unless I'm mistaken. So it should be possible to boil down the respective params classes to invoke a (common) function that returns the appropriate gem provider based on those fact values, or perhaps a hash of all the values that can be helpful for the different modules. (Each module will still need to extract the hash values into discrete variables.)

@b4ldr
Copy link
Member

b4ldr commented Dec 22, 2020

This seems old and as its talking about the puppet-hiera gem i'm guessing now obsolete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants