From 1e865368ac99007fb4aa62f2fb6ef33938561f08 Mon Sep 17 00:00:00 2001 From: Jimena Cabrera-Notari Date: Sun, 18 Jan 2015 10:56:40 +0000 Subject: [PATCH] Adds seconds to backup timestamp --- lib/ansible/module_utils/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index cee6510f34..17804426a7 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1268,8 +1268,8 @@ class AnsibleModule(object): def backup_local(self, fn): '''make a date-marked backup of the specified file, return True or False on success or failure''' - # backups named basename-YYYY-MM-DD@HH:MM~ - ext = time.strftime("%Y-%m-%d@%H:%M~", time.localtime(time.time())) + # 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) try: