Issue #4806 has been updated by James Turnbull.

Status changed from Needs more information to Needs design decision
Assignee set to Luke Kanies
Affected version set to 0.25.5

Not sure why the auto-require is happening? 
----------------------------------------
Bug #4806: file-resource: useless autorequire 
http://projects.puppetlabs.com/issues/4806

Author: Benedikt Köppel
Status: Needs design decision
Priority: Normal
Assignee: Luke Kanies
Category: 
Target version: 
Affected version: 0.25.5
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