Issue #4872 has been updated by James Turnbull. Target version changed from 2.6.6 to 2.6.x
---------------------------------------- Bug #4872: Unexpected results on "replace => false" on symlinks https://projects.puppetlabs.com/issues/4872 Author: Kai S Status: Accepted Priority: Normal Assignee: Category: file Target version: 2.6.x Affected Puppet version: 0.25.4 Keywords: symlink replace file Branch: When trying to use the file type on a symlink, making sure that it is initialized properly doesn't work as I would expect. Considering this recipe: file { "/home/thesymlink": ensure => "/home/idontexist", replace => false; } When I change created thesymlink to point to **something else** that doesn't exist (by hand), the next puppet run will replace thesymlink, and point it back to "/home/idontexist". If I point it at something that does exist, it works as expected. I would propose the attached patch, replacing the File.exists? test to a symlink test in puppet/type/file/target.rb: - elsif ! @resource.replace? and File.exists?(@resource[:path]) + elsif ! @resource.replace? and FileTest.symlink?(@resource[:path]) This seems to be "working" this way in most branches (0.25.4, 2.6.x). Kind regards, -- 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.
