1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

This commit is contained in:
sysadmin75 2015-01-23 18:10:00 -05:00 committed by Matt Clay
parent dd79a27e73
commit 2990358cd5

View file

@ -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)