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 %>" |
<%- 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 -%>
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