mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-24 02:20:51 +08:00
When renaming a file over another which is the same hard link, the rename is a no-op. This left many temporary files in /var/log/hosts because a file is attempted to be synced (and thus hard-linked between dated and undated file names) over a couple of days. The solution to this is how the `ln` command does it: rename, then unlink the temporary file. Signed-off-by: Nils Philippsen <nils@redhat.com>