Fix #10059 - replace module does not obey follow=yes

reviewable/pr18780/r1
sysadmin75 10 years ago
parent 670098af2d
commit 80a5500a23

@ -152,6 +152,8 @@ def main():
if changed and not module.check_mode: if changed and not module.check_mode:
if params['backup'] and os.path.exists(dest): if params['backup'] and os.path.exists(dest):
module.backup_local(dest) module.backup_local(dest)
if params['follow'] and os.path.islink(dest):
dest = os.path.realpath(dest)
write_changes(module, result[0], dest) write_changes(module, result[0], dest)
msg, changed = check_file_attrs(module, changed, msg) msg, changed = check_file_attrs(module, changed, msg)

Loading…
Cancel
Save