这对我来说是一个很大的问题,因为我不熟悉木偶。
傀儡大师的错误:
debug: importing '/etc/puppet/manifests/nodes/group-1.pp' err: Could not parse for environment production: Syntax error at '{'; expected '}' at /etc/puppet/manifests/nodes/group-1.pp:6
傀儡客户机上的错误:
err:无法从远程服务器检索目录:SERVER上的错误400:无法parsing环境生成:在语法错误'{'; 在/etc/puppet/manifests/nodes/group-1.pp:6预期'}'
在组1.pp中:
node 'group1' { include ntp class { 'nagios::host': #this is line 6 nodename => $clientcert, appname => 'test', } }
nagios ::主机在模块模块/ nagios / host.pp代码在这里:
class nagios::host($nodename, $hostgroup) { file { '/usr/lib/nagios/plugins': mode => "755", require => Package["nagios-plugins"], } ... @@nagios_service { "${nodename}_check_ssh": ensure => present, use => 'generic-service', host_name => "${nodename}", notification_interval => 60, flap_detection_enabled => 0, service_description => "SSH", check_command => "check_ssh", target => "/etc/nagios3/services.d/${nodename}.cfg", } }
和文件模块/ nagios / init.pp是空白的
我怎么解决它?
Puppet 0.25不支持参数化类,你必须升级到puppet> 2.6。
解决了。 木偶大师的版本是0.25,在Ubuntu 10.04 LTS上的默认。 我已经升级到2.7.14,并且运行正常。
我曾经有过类似的问题,原来是简单的语法问题。 在文档的某个地方,我有一个语法错误,但是几乎在那个文档的末尾,我显示了错误。 所以我build议哟检查你的括号,引号和逗号。