Issue #6804 has been reported by Frank Sweetser.

----------------------------------------
Bug #6804: +> operator only works on ignore in defaults context
https://projects.puppetlabs.com/issues/6804

Author: Frank Sweetser
Status: Unreviewed
Priority: Normal
Assignee: 
Category: parser
Target version: 
Affected Puppet version: 2.6.6
Keywords: 
Branch: 


In my global site.pp, I have this default value set:

<pre>
File {
  ignore => ["*~", "#*#", ".#*", ".git", ".gitignore"]
}
</pre>

Then, in a module, I'm attempting to add onto the ignore list in a recursive 
file resource:

<pre>
  file { "/etc/mrtg":
    ensure => directory,
    owner => root,
    group => mrtg,
    mode => 750,
    purge => true,
    recurse => true,
    source => "puppet:///modules/mrtg/empty",
    ignore +> ".for-git"
  }
</pre>

In 0.25, this worked fine.  In 2.6.6, though, it produces a parser error:

<pre>
Mon Mar 21 15:49:00 -0400 2011 Puppet (err): Could not retrieve catalog from 
remote server: Error 400 on SERVER: Syntax error at '+>'; expected '}' at 
/etc/puppet/modules/mrtg/manifests/init.pp:32 on node
</pre>

If instead I change it to a file type defaults within the module context, 
though, it appears to work fine:

<pre>
  File["/etc/mrtg"] { ignore +> ".for-git" }
  file { "/etc/mrtg":
    ensure => directory,
    owner => root,
    group => mrtg,
    mode => 750,
    purge => true,
    recurse => true,
    source => "puppet:///modules/mrtg/empty"
  }
</pre>

Was I doing something that should never have worked in the first place, or have 
I found a regression?


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to