-
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
This allows an override of the default DirectoryIndex directive #211
Conversation
@@ -1 +1,5 @@ | |||
<% if @indexes and @indexex != '' -%> |
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.
This is a typo, @indexex
.
Could you please have the template simply contain DirectoryIndex <%= @indexes.join(' ') %>
since we can enforce constraints and defaults in the manifest instead?
Thanks for all of your submissions @Aethylred! If you could start the rspec-puppet coverage for the apache::mod::dir` class then that would be awesome! But I understand if not. |
I've broken and fixed the spec tests for the default case :) ...now I just need to remember how to pass parameters for spec tests. |
Actually the tests failing was correct, as the |
I was suspecting something like that, Puppet being a declarative language and all. Each class declared only once. ...do you have a link to an example showing a working pattern for testing parametrised classes? |
@Aethylred Your pattern is actually working! The tests are just failing because of the way Otherwise https://github.com/puppetlabs/puppetlabs-apache/blob/master/spec/classes/apache_spec.rb#L220 is probably a good example of multiple different parameters, including verifying one value that raises a |
If you're asking about how to make this work now, that would require setting a different let :pre_condition do
'class { "apache":
default_mods => false,
}'
end |
Oh, also if you could clean up your git history to be functionally descriptive before merging, that would be awesome :). |
… in the template, and move logic from template to class.
Note: No package test as it seems mod_dir is distributed _with_ the Apache package.
ugh, dragged in some commits from master. |
Bother, now that I have learned this. It will be expected of me. |
Haha! :) |
This allows an override of the default DirectoryIndex directive
Currently the DirectoryIndex directive is set globally usingthe
dir.conf.erb
template. This PR allows the default inclusive DirectoryIndex string to be changed.Should we consider adding a DirectoryIndex override on
apache::vhost
?