diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index df4f176b53e..3f27ae8f4d0 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1820,7 +1820,7 @@ class AnsibleModule(object): if os.path.exists(fn): # backups named basename-YYYY-MM-DD@HH:MM:SS~ ext = time.strftime("%Y-%m-%d@%H:%M:%S~", time.localtime(time.time())) - backupdest = '%s.%s' % (fn, ext) + backupdest = '%s.%s.%s' % (fn, os.getpid(), ext) try: shutil.copy2(fn, backupdest)