I think, that mostly all ansible users work as root - native or over sudo. OK, path for backups can be changed.
This is not "if this were implemented". This is implemented by me :).
Old (native) backup's mechanism is unusable:
1. It has potential conflict with "conf.d"-like distros
2. There is data overriding when file is modified twice in one playbook, for example, many "lineinfile" step-by-step. The first modification will make backup with pattern %Y-%m-%d@%H:%M~, and the second one will override this backup. Original file will lost, it is a BIG problem for production systems!
I changed the pattern to %Y%m%d-%H%M%S, and added version number suffix to it, if this file still exists (if step-by-step modifications will be in same second).
I can push this modification into new git branch, and you can check and modify it (add homedir in backup path, etc.), and merge into devel branch.
суббота, 12 октября 2013 г., 1:10:19 UTC+4 пользователь James Cammarata написал: