FAQ
Hi,

I have a simple .pp file like

class ucarp2::host
{
define config( $node_id, $password="", $interface_primary,
$interface_vip, $vip_addr, $vip_addr_netmask, $vip_addr_gw,
$other_options = "", $ensure=present ) {
#Creating vip up/down scripts
ensure_resource('file', 'vip-up', {ensure => $present, path =>
'/etc/sysconfig/carp/vip-up', content => template("ucarp2/vip-up.erb"),
require => Package['ucarp']})
}
}

On puppet 2.7.19, no issues but on 2.6.8, it gives

err: Could not parse for environment production: Syntax error at '{';
expected '}' at /tmp/ucarp/manifests/host.pp:6

The function ensure_resource() actually comes from
https://github.com/bodepd/puppet-ensure_resource

Is this a bug in 2.6.8? It's a production (so can't upgrade as of now)
environment and I had set a update hook to avoid any syntax errors and
this is blocking me. What is going wrong here?

--
Cheers,
Abhijeet R
http://blog.abhijeetr.com

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

Search Discussions

  • Jcbollinger at Oct 25, 2012 at 1:05 pm

    On Thursday, October 25, 2012 6:29:10 AM UTC-5, Abhijeet Rastogi wrote:
    Hi,

    I have a simple .pp file like

    class ucarp2::host
    {
    define config( $node_id, $password="", $interface_primary,
    $interface_vip, $vip_addr, $vip_addr_netmask, $vip_addr_gw,
    $other_options = "", $ensure=present ) {
    #Creating vip up/down scripts
    ensure_resource('file', 'vip-up', {ensure => $present, path =>
    '/etc/sysconfig/carp/vip-up', content => template("ucarp2/vip-up.erb"),
    require => Package['ucarp']})
    }
    }

    On puppet 2.7.19, no issues but on 2.6.8, it gives

    err: Could not parse for environment production: Syntax error at '{';
    expected '}' at /tmp/ucarp/manifests/host.pp:6

    The function ensure_resource() actually comes from
    https://github.com/bodepd/puppet-ensure_resource

    Is this a bug in 2.6.8? It's a production (so can't upgrade as of now)
    environment and I had set a update hook to avoid any syntax errors and
    this is blocking me. What is going wrong here?
    As a guess, Puppet 2.6 may not support hash literals as function
    arguments. If that's indeed the problem then you could work around it by
    assigning the hash to a variable and passing the variable.


    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/-/NDWafDF2nFgJ.
    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.
  • Abhijeet R at Oct 25, 2012 at 1:52 pm
    Hi jcbollinder,

    Your guess is right. That fixed the issue.
    On Thu 25 Oct 2012 06:35:19 PM IST, jcbollinger wrote:


    On Thursday, October 25, 2012 6:29:10 AM UTC-5, Abhijeet Rastogi wrote:

    Hi,

    I have a simple .pp file like

    class ucarp2::host
    {
    define config( $node_id, $password="", $interface_primary,
    $interface_vip, $vip_addr, $vip_addr_netmask, $vip_addr_gw,
    $other_options = "", $ensure=present ) {
    #Creating vip up/down scripts
    ensure_resource('file', 'vip-up', {ensure => $present, path =>
    '/etc/sysconfig/carp/vip-up', content =>
    template("ucarp2/vip-up.erb"),
    require => Package['ucarp']})
    }
    }

    On puppet 2.7.19, no issues but on 2.6.8, it gives

    err: Could not parse for environment production: Syntax error at '{';
    expected '}' at /tmp/ucarp/manifests/host.pp:6

    The function ensure_resource() actually comes from
    https://github.com/bodepd/puppet-ensure_resource
    <https://github.com/bodepd/puppet-ensure_resource>

    Is this a bug in 2.6.8? It's a production (so can't upgrade as of
    now)
    environment and I had set a update hook to avoid any syntax errors
    and
    this is blocking me. What is going wrong here?


    As a guess, Puppet 2.6 may not support hash literals as function
    arguments. If that's indeed the problem then you could work around it
    by assigning the hash to a variable and passing the variable.


    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/-/NDWafDF2nFgJ.
    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.
    --
    Cheers,
    Abhijeet R
    http://blog.abhijeetr.com

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 25, '12 at 11:29a
activeOct 25, '12 at 1:52p
posts3
users2
websitepuppetlabs.com

2 users in discussion

Abhijeet R: 2 posts Jcbollinger: 1 post

People

Translate

site design / logo © 2022 Grokbase