Issue #4806 has been updated by James Turnbull.

Status changed from Unreviewed to Needs more information

What version is this?
----------------------------------------
Bug #4806: file-resource: useless autorequire 
http://projects.puppetlabs.com/issues/4806

Author: Benedikt Köppel
Status: Needs more information
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected version: 
Keywords: 
Branch: 


file-ressource: useless autorequire when ensure => absent

I have a file resource like that:
<pre>
file { '/home/$user':
  owner => $user,
  ensure => $ensure
} 
</pre>

with $user and $ensure filled by a define "account"

When I now set account { 'beni': ensure => absent }, puppet still generates a 
autorequire => User['beni'], even though the file /home/beni doesn't need that 
user.

A workaround is this:
<pre>
file { '/home/$user':
  owner => $ensure ? {
    present => $user,
    absent => []
  }
  ensure => $ensure
}
</pre>


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