notify

15 views
Skip to first unread message

Stuart Cracraft

unread,
Nov 22, 2013, 1:18:15 PM11/22/13
to puppet...@googlegroups.com
In nodes.pp I have:

:
node 'somenode' {
  class { 'someclass':    <= this is line 12
     $somevariable = "somevalue",
  }
}
:

My intent with this is for the somenode node to have someclass
define its internal variable somevariable with somevalue.

However, on the agent run, this produces the error in messages:

  Date/Time Host puppet-agent[pid]: Could not parse for environment production: Syntax error at 'somevariable'; expected
    '}' at /etc/puppet/manifests/nodes.pp:12 on node somenode

My question is, where's the syntax error it is complaining about?


Stuart

Ken Barber

unread,
Nov 22, 2013, 1:20:04 PM11/22/13
to Puppet Users
Missing a > on the line with $somevariable ...? For example it should be:

node 'somenode' {
class { 'someclass':
$somevariable => "somevalue",
> --
> 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/7d462dd3-8d8c-480a-bef7-e3264e569382%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Stuart Cracraft

unread,
Nov 22, 2013, 1:32:25 PM11/22/13
to puppet...@googlegroups.com

I did the => as you were posting but still got the same error...

Matthaus Owens

unread,
Nov 22, 2013, 2:06:42 PM11/22/13
to Puppet Users
Stuart,
It should be
somevariable => "somevalue",
and not
$somevariable => "somevalue",
> https://groups.google.com/d/msgid/puppet-users/64bffdb5-36e5-4b3e-96c4-d0e71e3f5526%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.



--
Matthaus Owens
Release Manager, Puppet Labs

Join us at PuppetConf 2014, September 23-24 in San Francisco

Rodent of Unusual Size

unread,
Nov 22, 2013, 1:50:20 PM11/22/13
to puppet...@googlegroups.com
On 11/22/2013 01:32 PM, Stuart Cracraft wrote:
>
> I did the => as you were posting but still got the same error...
>
> On Friday, November 22, 2013 10:20:04 AM UTC-8, Ken Barber wrote:
>
> Missing a > on the line with $somevariable ...? For example it
> should be:
>
> node 'somenode' {
> class { 'someclass':
> $somevariable => "somevalue",
> }
> }

Remove the '$' from '$somevariable'.
--
Ken Coar
Sanagendamgagwedweinini

Ken Barber

unread,
Nov 22, 2013, 2:11:12 PM11/22/13
to Puppet Users
Oops. Yeah what everyone else (Haus & Rodent) said, so remove $ and add >:

Was:

node 'somenode' {
class { 'someclass':
$somevariable = "somevalue",
}
}

Should be:

node 'somenode' {
class { 'someclass':

Stuart Cracraft

unread,
Nov 22, 2013, 2:13:03 PM11/22/13
to puppet...@googlegroups.com
Thanks.
Reply all
Reply to author
Forward
0 new messages