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

(#13860) Autorequire Package['httpd'] #23

Merged
merged 2 commits into from
Apr 12, 2012

Conversation

ccaum
Copy link
Contributor

@ccaum ccaum commented Apr 10, 2012

Previous to this commit, the a2mod type did not autorequire the
Package['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.

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.
@bodepd
Copy link
Contributor

bodepd commented Apr 10, 2012

@ccaum This suitability issue can be resolved by using 'optional_commands' instead of 'commands'

end
end

autorequire(:package) { catalog.resource(:package, 'httpd')}
Copy link
Contributor

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'] }

?

Copy link
Contributor Author

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
@ccaum
Copy link
Contributor Author

ccaum commented Apr 12, 2012

@bodepd optional_commands fixed in a35ede5

bodepd added a commit that referenced this pull request Apr 12, 2012
@bodepd bodepd merged commit 789d8d3 into puppetlabs:master Apr 12, 2012
Aethylred pushed a commit to nesi/puppetlabs-apache that referenced this pull request Apr 15, 2013
Add ripienaar/concat dependancy to Modulefile
traylenator pushed a commit to traylenator/puppetlabs-apache that referenced this pull request Jun 7, 2022
(maint)fixing syntax error in compose spec file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants