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

jcbollinger
Thu, 25 Oct 2012 13:05:19 -0000

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