Merge pull request #694 from sysadmin75/10059_replace_follow_fix
Fix #10059 - replace module does not obey follow=yes
This commit is contained in:
commit
1ff9c64b30
1 changed files with 2 additions and 0 deletions
|
@ -152,6 +152,8 @@ def main():
|
|||
if changed and not module.check_mode:
|
||||
if params['backup'] and os.path.exists(dest):
|
||||
module.backup_local(dest)
|
||||
if params['follow'] and os.path.islink(dest):
|
||||
dest = os.path.realpath(dest)
|
||||
write_changes(module, result[0], dest)
|
||||
|
||||
msg, changed = check_file_attrs(module, changed, msg)
|
||||
|
|
Loading…
Reference in a new issue