unsafe writes! (#4314)

* unsafe writes!

* moved unsafe_write docs and args to file common

* added unsafe_writes option handling
This commit is contained in:
Brian Coca 2016-08-09 12:39:25 -04:00 committed by Matt Clay
commit 81e87cefd7
4 changed files with 7 additions and 8 deletions

View file

@ -164,7 +164,7 @@ def write_changes(module,lines,dest):
module.fail_json(msg='failed to validate: '
'rc:%s error:%s' % (rc,err))
if valid:
module.atomic_move(tmpfile, os.path.realpath(dest))
module.atomic_move(tmpfile, os.path.realpath(dest), unsafe_writes=module.params['unsafe_writes'])
def check_file_attrs(module, changed, message, diff):