Most trivial site.pp throwing errors

123 views
Skip to first unread message

Sam K

unread,
Mar 18, 2014, 1:48:43 AM3/18/14
to puppet...@googlegroups.com
Hello All.

  My very first post and a Super-noob puppet user checking in.  I have been using puppet for just a week or so and have had moderate success with 2 ubuntu master/agent setup.

  Now, I want to test it on a production system, but its driving me nuts.  I have a Ubuntu 12.04 system running puppetmaster and a couple of Redhat 6.0 running the agent.  I have them talking and both can ping by FQDN, IP, etc. the master was able to find and sign the agent's certificate as well.  I am trying to create/delete a username called katie. 

This site.pp works perfectly!

user { 'katie':
        ensure => 'present',
        home => '/home/katie-home',
        shell => '/bin/csh'
}


While this does work on this node, on another node, it does not even work. 

class add-user {

        user { 'katie':
                ensure => 'present',
                home => '/home/katie-home',
                shell => '/bin/csh'
        }
}

node 'bb10-x64-rhel60' {
        import add-user
}

But most annoying is this error.  Why is this error coming up and why does it work even with errors.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at 'add-user'; expected '}' at /etc/puppet/manifests/site.pp:11 on node bb10-x64-rhel60

On the agent, each time I modify site.pp, I am running 'puppet agent --no-daemonize --onetime --verbose'

Thanks
Sam

Sam K

unread,
Mar 18, 2014, 1:20:53 PM3/18/14
to puppet...@googlegroups.com
 No help?  Anyone have any ideas why I'm getting this error.

Peter Bukowinski

unread,
Mar 18, 2014, 1:25:44 PM3/18/14
to puppet...@googlegroups.com
On Mar 18, 2014, at 1:20 PM, Sam K <sreer...@gmail.com> wrote:

 No help?  Anyone have any ideas why I'm getting this error.

Oh eager-to-be helped one, please see my reponses in-line below.

On Monday, March 17, 2014 10:48:43 PM UTC-7, Sam K wrote:
Hello All.

  My very first post and a Super-noob puppet user checking in.  I have been using puppet for just a week or so and have had moderate success with 2 ubuntu master/agent setup.

  Now, I want to test it on a production system, but its driving me nuts.  I have a Ubuntu 12.04 system running puppetmaster and a couple of Redhat 6.0 running the agent.  I have them talking and both can ping by FQDN, IP, etc. the master was able to find and sign the agent's certificate as well.  I am trying to create/delete a username called katie. 

This site.pp works perfectly!

user { 'katie':
        ensure => 'present',
        home => '/home/katie-home',
        shell => '/bin/csh'
}


While this does work on this node, on another node, it does not even work. 

class add-user {

        user { 'katie':
                ensure => 'present',
                home => '/home/katie-home',
                shell => '/bin/csh'
        }
}

node 'bb10-x64-rhel60' {
        import add-user
}

But most annoying is this error.  Why is this error coming up and why does it work even with errors.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at 'add-user'; expected '}' at /etc/puppet/manifests/site.pp:11 on node bb10-x64-rhel60

You must use 'include' and not 'import' here. 'import' can only specify files, not classes. See the docs here: http://docs.puppetlabs.com/puppet/latest/reference/lang_import.html

On the agent, each time I modify site.pp, I am running 'puppet agent --no-daemonize --onetime --verbose'

Thanks
Sam

--
Peter Bukowinski

José Luis Ledesma

unread,
Mar 18, 2014, 1:43:24 PM3/18/14
to puppet...@googlegroups.com

Be water  my friend ;p

http://docs.puppetlabs.com/puppet/latest/reference/lang_reserved.html

Hyphens should not be in a class name.

Regards,

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e44703d2-5b73-456f-a8e1-eef585518a5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sreeram Krishna

unread,
Mar 18, 2014, 2:07:35 PM3/18/14
to puppet...@googlegroups.com
Oh god!  Really, was it that trivial?  Thank you guys!  Let me try it out. 


--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/iL11EBmPgEA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAF_B3dcBMbg%3D_HD4rP2Pibqw-KKHAmomW245bFzPAAC3jm6QnA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages