Jen Patrick
2012-Aug-14 14:49 UTC
[Puppet Users] Error 400 on SERVER: Could not parse for environment production: Syntax error at ''{''; expected ''}''
It''s barfing on this: Error 400 on SERVER: Could not parse for environment production: Syntax error at ''{''; expected ''}'' Here''s the node.pp node "ccc.unix.ccc.ccc.edu" { class { "web_server": net_static => { "eth0" => { "macaddress" => $macaddress_eth0, "ipaddress" => "192.168.185.228", "netmask" => "2255.255.255.128", "gateway" => "192.168.185.129", } }, environment => "production", unattended_update => true, nfs => false, proxy => false, apachessl => false, admins => ["void", "Null"]; } apache::vhost { $fqdn: priority => ''20'', port => ''80'', docroot => ''/var/www'', } # open firewall from vpn firewall { "044 allow SSH from 192.168.10.0/23": action => "accept", proto => "tcp", dport => "22", source => ''192.168.10.0/23''; } } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4wBjWB34Di8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Justin Stoller
2012-Aug-14 17:04 UTC
Re: [Puppet Users] Error 400 on SERVER: Could not parse for environment production: Syntax error at ''{''; expected ''}''
On Tue, Aug 14, 2012 at 7:49 AM, Jen Patrick <jenaflynn@gmail.com> wrote:> It''s barfing on this:Is this in relation to a previous thread?> Error 400 on SERVER: Could not parse for environment production: Syntax > error at ''{''; expected ''}''is there a line number?> > Here''s the node.ppDoes this work?> > node "ccc.unix.ccc.ccc.edu" { > class {$static = { "eth0" => { "macaddress" => $macaddress_eth0, "ipaddress" => "192.168.185.228", "netmask" => "2255.255.255.128", "gateway" => "192.168.185.129", } }> "web_server":net_static => $static,># net_static => { ># "eth0" => { ># "macaddress" => $macaddress_eth0, ># "ipaddress" => "192.168.185.228", ># "netmask" => "2255.255.255.128", ># "gateway" => "192.168.185.129", ># } ># }, > > environment => "production", > unattended_update => true, > nfs => false, > proxy => false, > apachessl => false, > admins => ["void", "Null"]; > } > > apache::vhost { > $fqdn: > priority => ''20'', > port => ''80'', > docroot => ''/var/www'', > } > > > > # open firewall from vpn > firewall { > "044 allow SSH from 192.168.10.0/23": > action => "accept", > proto => "tcp", > dport => "22", > source => ''192.168.10.0/23''; > } > } > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/4wBjWB34Di8J. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Aug-15 14:02 UTC
[Puppet Users] Re: Error 400 on SERVER: Could not parse for environment production: Syntax error at ''{''; expected ''}''
On Tuesday, August 14, 2012 9:49:53 AM UTC-5, Jen Patrick wrote:> > It''s barfing on this: > Error 400 on SERVER: Could not parse for environment production: Syntax > error at ''{''; expected ''}'' > > Here''s the node.pp > > node "ccc.unix.ccc.ccc.edu" { > class { > "web_server": > net_static => { > "eth0" => { > "macaddress" => $macaddress_eth0, > "ipaddress" => "192.168.185.228", > "netmask" => "2255.255.255.128", > "gateway" => "192.168.185.129", > } > }, > >As a different thread recently discussed, although once Puppet accepted hash literals as parameter values, the most recent version does not. I''m guessing the change was inadvertent, and there is already a ticket filed on it. At this point, your options are - downgrade your master to a version that works (I''m not sure exactly which release broke, but I understand that 2.7.1 works), or - assign your hash to a variable, and assign the variable as the parameter value - dump class parametrization in favor of something better (i.e. almost anything else), such as hiera or global variables +/- ENC John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Pcm695H8bCsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jeff McCune
2012-Aug-15 14:42 UTC
Re: [Puppet Users] Re: Error 400 on SERVER: Could not parse for environment production: Syntax error at ''{''; expected ''}''
On Wed, Aug 15, 2012 at 7:02 AM, jcbollinger <John.Bollinger@stjude.org>wrote:> > > On Tuesday, August 14, 2012 9:49:53 AM UTC-5, Jen Patrick wrote: >> >> It''s barfing on this: >> Error 400 on SERVER: Could not parse for environment production: Syntax >> error at ''{''; expected ''}'' >> >> Here''s the node.pp >> >> node "ccc.unix.ccc.ccc.edu" { >> class { >> "web_server": >> net_static => { >> "eth0" => { >> "macaddress" => $macaddress_eth0, >> "ipaddress" => "192.168.185.228", >> "netmask" => "2255.255.255.128", >> "gateway" => "192.168.185.129", >> } >> }, >> >> > As a different thread recently discussed, although once Puppet accepted > hash literals as parameter values, the most recent version does not. >This is definitely a bug. =( John, do you know if it got filed as a ticket? -Jeff -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Aug-15 15:19 UTC
Re: [Puppet Users] Re: Error 400 on SERVER: Could not parse for environment production: Syntax error at ''{''; expected ''}''
On Wednesday, August 15, 2012 9:42:56 AM UTC-5, Jeff McCune wrote:> > > This is definitely a bug. =( John, do you know if it got filed as a > ticket? > >I was thinking of this ticket: http://projects.puppetlabs.com/issues/14301. On it''s face, it''s not exactly the same thing, but it''s definitely related. I would bet that the same change to the DSL grammar caused both issues, and that one fix can take care of both. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ppHd4Ra-eDoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.