Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

It's a big problem to me, because I'm not familiar with puppet.

ERROR on the puppetmaster:

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

ERROR on the puppet client:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at '{'; expected '}' at /etc/puppet/manifests/nodes/group-1.pp:6

in group-1.pp:

node 'group1'
{
        include ntp 

        class { 'nagios::host':           #this is line 6
                nodename => $clientcert,
                appname => 'test',
        }   
}

nagios::host in module module/nagios/host.pp code are here:

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",
    } 
}

and the file module/nagios/init.pp is blank

How could I fix it ?

share|improve this question
    
What's in modules/ntp/ntp.pp ( or similar ) –  Tom O'Connor Jun 7 '12 at 10:44
    
It's ntp service, it runs ok –  jiangchengwu Jun 7 '12 at 11:33
    
Where is appname parameter from? –  quanta Jun 7 '12 at 17:27

3 Answers 3

Puppet 0.25 does not support parametrized classes, you must upgrade to puppet > 2.6.

share|improve this answer

That's solved. The puppet master version is 0.25, defautl on ubuntu 10.04 LTS. I've upgrade it to 2.7.14 , and it runs ok.

share|improve this answer

I once had a similar problem, it turned out to be simple syntax problem. Somewhere in a document I had a syntax error but I showed the error to me almost at the end of that document. So I'd advise yoCheck your parentheses, quotes and commas.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.