Estou recebendo o seguinte erro ao tentar usar o módulo puppetlabs-apache mais recente do github ( link ):
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter identifier at /etc/puppet/environments/development/modules/apache/manifests/mod.pp:40 on node cacti.mydomain.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping runn
A configuração do meu nó se parece com:
node 'cacti.eye.fi' inherits 'base' {
include apache
include mysql::server
include yumrepos::epel
package { 'cacti':
ensure => 'latest',
}
}
conteúdos do mod.pp:
define apache::mod (
$package = undef
) {
$mod = $name
include apache::params
#include apache #This creates duplicate resources in rspec-puppet
$mod_packages = $apache::params::mod_packages
$mod_package = $mod_packages[$mod] # 2.6 compatibility hack
if $package {
$package_REAL = $package
} elsif "$mod_package" {
$package_REAL = $mod_package
}
$mod_libs = $apache::params::mod_libs
$mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
if "${mod_lib}" {
$lib = $mod_lib
}
$mod_identifiers = $apache::params::mod_identifiers
$mod_identifier = $mod_identifiers[$mod]
if "${mod_identifier}" {
$identifier = $mod_identifier
}
if $package_REAL {
package { $package_REAL:
ensure => present,
require => Package['httpd'],
before => A2mod[$mod],
}
}
a2mod { $mod:
ensure => present,
lib => $lib,
identifier => $identifier,
require => Package['httpd'],
notify => Service['httpd'],
}
}
Eu verifiquei que o tipo /var/lib/puppet/lib/puppet/type/a2mod.rb
tem o parâmetro identificador e é o mesmo MD5 que o servidor:
Puppet::Type.newtype(:a2mod) do
@doc = "Manage Apache 2 modules"
ensurable
newparam :name do
desc "The name of the module to be managed"
isnamevar
end
newparam :lib do
desc "The name of the .so library to be loaded"
defaultto { "mod_#{@resource[:name]}.so" }
end
newparam :identifier do
desc "Module identifier string used by LoadModule. Default: module-name_module"
# http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier
defaultto { "#{@resource[:name]}_module" }
end
autorequire(:package) { catalog.resource(:package, 'httpd')}
fim
Estou usando o Puppet 3.0.2 no agente e no mestre. Alguma ideia do que pode causar isso?