FAQ
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.

Search Discussions

  • Justin Stoller at Aug 14, 2012 at 5:04 pm

    On Tue, Aug 14, 2012 at 7:49 AM, Jen Patrick 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.pp
    Does 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 at Aug 15, 2012 at 2:02 pm

    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 at Aug 15, 2012 at 2:43 pm
    On Wed, Aug 15, 2012 at 7:02 AM, jcbollinger 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 at Aug 15, 2012 at 3:19 pm

    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 14, '12 at 4:48p
activeAug 15, '12 at 3:19p
posts5
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase