-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Added option to notify httpd service for mod_php #460
base: master
Are you sure you want to change the base?
Conversation
manifests/apache_config.pp
Outdated
@@ -10,15 +10,25 @@ | |||
# | |||
class php::apache_config( | |||
Stdlib::Absolutepath $inifile = $php::params::apache_inifile, | |||
Hash $settings = {} | |||
Hash $settings = {}, | |||
String $service = nil, |
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.
Could you update this to undef and make it optional? nil is pretty uncommon in Puppet and we try to stick with undef.
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.
Thanks for the hint. Should be fixed now.
Can you please add tests for the change and rebase after #469 got merged? That will fix the current acceptance tests issues on travis. |
8b63fe8
to
037eca3
Compare
I have rebased my pull request which seems to fix the Travis tests. I have no experience in writing Puppet tests and none of the existing tests gave me a hint how to test a service restart after a configuration change. As long as usage of |
I had something like this in mind: spec/acceptance/php_spec.rb | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/spec/acceptance/php_spec.rb b/spec/acceptance/php_spec.rb
index e00c743..426185c 100644
--- a/spec/acceptance/php_spec.rb
+++ b/spec/acceptance/php_spec.rb
@@ -3,7 +3,8 @@ require 'spec_helper_acceptance'
describe 'php with default settings' do
context 'default parameters' do
it 'works with defaults' do
- pp = 'include php'
+ install_module_from_forge('puppetlabs/apache', '>= 3.2.0 < 4.0.0')
+ pp = 'include apache; include php'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
@@ -32,4 +33,18 @@ describe 'php with default settings' do
it { is_expected.to be_enabled }
end
end
+
+ context 'with apache' do
+ it 'works' do
+ pp = <<-EOS
+ class { 'php':
+ apache_config => true,
+ apache_service_name => 'httpd',
+ }
+ EOS
+ # Run it twice and test for idempotency
+ apply_manifest(pp, catch_failures: true)
+ apply_manifest(pp, catch_changes: true)
+ end
+ end
end |
@bastelfreak Thanks for the hint. I'll try that. |
hey @thorstenk. Any update on this? |
Dear @thorstenk, thanks for the PR! This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
1 similar comment
Dear @thorstenk, thanks for the PR! This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
Dear @thorstenk, thanks for the PR! This is pccibot, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
Pull Request (PR) description
If
php::settings
are changed and Apachesmod_php
is used the Apache httpd must be restarted to re-read the config files.This PR adds an option to identify the name of the Puppet Service resource to enable a restart of Apache httpd.