-
Notifications
You must be signed in to change notification settings - Fork 74
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
Duplicate declaration due to contain ::apt #110
Comments
@HT43-bqxFqB I've changed the In your code, switch the order of |
Works perfect now, thanks! I don't get why the order in the manifest matters due to puppet being stateless o_O |
The evaluation order can be important when a catalog is being compiled. A class can be ‘ ‘included’ multiple times, but once it’s been added to the catalog, you can’t declare it ‘resource-style’. When an agent applies a catalog, then it’s all about the resource relationships. |
Your other option was to use hiera to configure |
I was not aware that the evaluation order on compilation was important. Thanks for that tip! |
yeah, try referencing variables from other classes before they've been parsed... :) |
In one of our profile classes for managing apt we call
unattended_upgrades
and theapt
class. The change in Version 3.0.0 to usecontain ::apt
causes a duplicate declaration error.Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Call
unattended_upgrades
andapt
class in the same Puppet class code without hiera:What are you seeing
Any additional information you'd like to impart
Is there a way to work around this in my code?
The text was updated successfully, but these errors were encountered: