[Puppet Users] Syntax error in 2.6.8 but not in 2.7.19

Abhijeet R
Thu, 25 Oct 2012 11:29:47 -0000

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