-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
(#13860) Autorequire Package['httpd'] #23
(#13860) Autorequire Package['httpd'] #23
Conversation
Previous to this commit, the `a2mod type did not autorequire the Package['httpd'] resource provided by the `apache` class. If the Package['httpd'] resource was enforced after any a2mod resources, the a2mod resources would fail since the httpd package installs the a2emod/a2dismod system commands.
@ccaum This suitability issue can be resolved by using 'optional_commands' instead of 'commands' |
end | ||
end | ||
|
||
autorequire(:package) { catalog.resource(:package, 'httpd')} |
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.
is there any reason that you can't just use:
autorequire(:package) { ['httpd'] }
?
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.
I didn't know that was possible. I can change it to that if you'd prefer
Previous to this comit, the a2enmod and a2dismod commands were required for the a2mod provider to be used by puppet on the first run. Since these commands are not always available on the first run, the catalog application might fail. This commit makes the commands optional, so the provider's validity will be evaluated when an a2mod resource is enforced
(#13860) Autorequire Package['httpd']
Add ripienaar/concat dependancy to Modulefile
(maint)fixing syntax error in compose spec file
Previous to this commit, the
a2mod
type did not autorequire thePackage['httpd'] resource provided by the
apache
class.It turns out, since puppet checks the suitability for the provider at the beginning run of the catalog, the a2mod provider is never suitable until the second puppet run. Still, this autorequire is a good idea as I think the current master branch of puppet resolves the suitability problem.