In the `apache` class there is a `default_mods` parameter as well (param
https://github.com/puppetlabs/puppetlabs-apache#default_mods and code path
https://github.com/puppetlabs/puppetlabs-apache/blob/28e9d41b2028f13c81b43e47c79bd28899170ccb/manifests/init.pp#L334-L345),
it looks like you would want to set that to `false` or an array that does
not contain `expires`. That is just from a simple reading of the
description and the code, not from experience using it, though.


Rob Nelson
[email protected]

On Wed, Jan 18, 2017 at 12:13 PM, Flannon Jackson <[email protected]> wrote:

> I'm running puppet 4.8 and I'm trying to configure the Puppetlabs-Apache
> module, which is v1.10.0.  According to the README apache::mod::expires has
> three parameters, one of which is expires_default.  (
> https://forge.puppet.com/puppetlabs/apache#class-apachemodexpires).  It
> also says that is uses expires.conf.erb to generate it's configuration and
> that expires_default is undef by default, and 
> puppetlabs-apache/templates/mod/expires.conf.erb
> has the following template,
>
>     ExpiresActive <%= scope.function_bool2httpd([@expires_active]) %>
>     <%- if ! @expires_default.nil? and ! @expires_default.empty? -%>
>     ExpiresDefault "<%= @expires_default %>"
>     <%- end -%>
>     <%- if ! @expires_by_type.nil? and ! @expires_by_type.empty? -%>
>     <%- [@expires_by_type].flatten.each do |line| -%>
>     <%- line.map do |type, seconds| -%>
>     ExpiresByType <%= type %> "<%= seconds -%>"
>     <%- end -%>
>     <%- end -%>
>     <%- end -%>
>
> So I figured I could do this to set the value for ExpiresDefault in the
> apache config,
>
>     class { 'apache::mod::expires' :
>         expires_default => ['access', 'plus', '5184000', 'seconds',],
>     }
>
> But when I run Puppet I get a duplicate declarations error,
>
> "Error: Evaluation Error: Error while evaluating a Resource Statement,
> Duplicate declaration: Apache::Mod[expires] is already declared in file
> /tmp/vagrant-puppet/environments/development/modules/thirdparty/apache/manifests/default_mods.pp:66;
> cannot redeclare at /tmp/vagrant-puppet/environments/development/
> modules/thirdparty/apache/manifests/mod/expires.pp:7 at
> /tmp/vagrant-puppet/environments/development/modules/thirdparty/apache/manifests/mod/expires.pp:7:3
> on node loris.local"
>
> So it looks like apache::mod::expires is defined in default_mods.pp and
> mod/expires.pp.  I'm not really sure what's going on, but I feel like I'm
> missing something very basic here.
>
> Any help would be appreciated,
>
> Thanks,
>
> -f
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/4a571f98-16dd-4e7c-af1d-da4e5ba89871%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/4a571f98-16dd-4e7c-af1d-da4e5ba89871%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC76iT-OaL20L_5%2BxL73JSCLQ9T%2BEco%3D%3Duvnwzi5LoztJGS7%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to