New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible-2.5.2 file state=link force=yes no longer works #39558
Comments
May be related to #39553 |
Setting follow=false seems to work around the problem |
The default value of follow was intended to change from False to True for the 2.5.0 release this was a change from previous behavior in 2.4.x. The proposal to do that is here: ansible/proposals#69 However, there was a bug introduced which made it not take effect in 2.5.0 and 2.5.1 which was fixed in the release of 2.5.2. The original PR to change the default behavior happened back in November #31430 The workaround you identified of setting follow=False will revert to the previous behaviour which should be safe. I'm leaving this open for now because I think that the combination of state=link follow=True force=True should work but I have to take a look to make sure I'm not missing something before I just go changing it. |
In my testing, creating the link works but once the link exists, the second run fails:
@sdodson Does that match with your experience? |
@abadger yeah, only happens when the link already exists, based on the traceback i imagine it's trying to apply selinux contexts
|
@sdodson I think that #39635 will solve this case but I'm going to get some additional input from other committers before deciding whether to merge it. The code there is deciding that follow=True can never be correct and therefore it's essentially changing to follow=False behaviour. I need to verify that others agree with doing that. |
When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558 (cherry picked from commit 4f664f8)
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes #39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes #39558 (cherry picked from commit 4f664f8)
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
* Fix for file module with symlinks to nonexistent target When creating a symlink to a nonexistent target, creating the symlink would work but subsequent runs of the task would fail because it was trying to operate on the target instead of the symlink. Fixes ansible#39558
ISSUE TYPE
COMPONENT NAME
file module
ANSIBLE VERSION
ansible-2.5.2 from RHEL 2.5 channels
does not happen in 2.5.1
CONFIGURATION
no changes
OS / ENVIRONMENT
RHEL 7.5
SUMMARY
The file module can no longer create a dangling symlink.
STEPS TO REPRODUCE
EXPECTED RESULTS
A dangling symlink from /etc/sdodson-test to /etc/non-existent
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: