-
-
Notifications
You must be signed in to change notification settings - Fork 883
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
Use some more puppet 4 features to reduce code #1058
Conversation
manifests/init.pp
Outdated
@@ -172,8 +172,8 @@ | |||
manage_repo => $manage_repo, | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contain '::nginx::package'
needed too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, no, as you can see, it's instantiated in resource format for reasons not entirely clear to me…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@igalic You can, (and I think should), still contain
it.
To contain classes that are declared with the resource-like declaration syntax, use the contain function after declaring the class
https://docs.puppet.com/puppet/4.9/lang_containment.html
@igalic can you check the failed tests? We can probably just drop them. |
funnily enough, the failed tests were because of the removed anchors. |
+1 for this (even if we have to adjust / kills some tests). This should make things a lot more readable. Agree on the 'fixme' bits, that pattern is really redundant and should probably have a function that handles it in a generic way. If someone comes up with the base pattern, I could probably help converting some of the templates. |
i think it's very much on point, that the first line of this commit message is longer than the recommended 59 characters.
puppet 3.7 already had this down, and we're requiring 4.6
worse yet, it's in ruby templates, rather than in puppet
@igalic thanks! |
Use some more puppet 4 features to reduce code
and increase readability!