1

我正在尝试将参数传递给一个类,但遇到了重复声明错误。文档说明了这一点:https ://github.com/puppetlabs/puppetlabs-apache#class-apachemodalias

以下产量: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Apache::Mod[alias] is already declared

class { 'apache':
  server_signature  => 'off',
  trace_enable      => 'off',
  mpm_module        => 'prefork'
}

include apache::mod::headers
include apache::mod::rewrite
class { 'apache::mod::alias':
  icons_options => 'None',
}
4

1 回答 1

0

default_mods需要设置 apache的参数,因为 apache 模块默认包含别名模块。以下将禁用所有允许您明确定义自己的默认模块。

default_mods => false

class { 'apache':
  server_signature  => 'off',
  trace_enable      => 'off',
  mpm_module        => 'prefork',
  default_mods        => false
}

include apache::mod::headers
include apache::mod::rewrite
class { 'apache::mod::alias':
  icons_options => 'None',
}
于 2018-04-05T18:49:05.643 回答