Affects Version/s: PUP 5.5.17
Fix Version/s: None
Component/s: Catalog Application
Template:PUP Bug Template customfield_10700 340916
Agent OS:CentOS 7
Master OS:CentOS 7
Method Found:Needs Assessment
QA Risk Assessment:Needs Assessment
Puppet Version: 5.5.17-1.el7
Puppet Server Version:5.3.10-1.el7
OS Name/Version: Centos 7
This is a copy of an old redmine ticket that was never resolved:
To summarize, if puppet contains a declaration:
...and '/foo' already exists as a dangling symlink (pointing to a file that does not exist), then puppet will change the symlink to point back to '/bar'.
Puppet should respect replace => false and not replace the symlink.
As described above, puppet replaces the symlink.
I looked at the code and I think the current behavior is the same in master, though I don't have the means to test it myself. These parts seem relevant:
I think that for this functionality, the file resource code should instead use a function that does not follow symlinks. Puppet is supposed to be managing the symlink, and the target (present or not) is irrelevant. When creating a symlink, puppet correctly does not care if the target exists.