-
Notifications
You must be signed in to change notification settings - Fork 194
puppet agent include the APT class locking it and will make other .pp fail if they include apt #731
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
Comments
@aqueos can you provide a complete example manifest to reproduce the error? |
hi, yes, for exemple this code 👍 , sorry the firts one was stupid here is the good one
lead to
best regards, |
ah, I can reproduce too, thanks!
However, this diff below doesn't solve the problem, because puppet evaluates the manifest in the order specified. So when the - include apt
+ if !defined(Class['apt']) {
+ include apt
+ } @kenyon @bastelfreak is there a pattern for avoiding this problem? |
Yes, I think using hiera is typically how to supply parameters to puppetlabs-apt. |
IMO |
Thank you @kenyon and @bastelfreak, that makes sense. I'm going to close this. |
Describe the Bug
hi,
This module include the class apt but if it is called elsewhere with parameters this will conflict.
If included elsewhere on a node it will lead to :
Error while evaluating a Resource Statement, Duplicate declaration: Class[Apt] is already declared;
Expected Behavior
It should not think important class like the APT one is used only in the module as it can be used elsewhere with parameters and other things. a quick test can help i think ?
this seems enough to prevent this :)
Steps to Reproduce
Steps to reproduce the behavior:
use in a node the apt class, then use the puppet agent module.
Environment
Additional Context
here is the patch i used:
The text was updated successfully, but these errors were encountered: