community.general/lib/ansible
Pascal Grange 8b08a28c89 fixes issue #13981: unsafe_writes block appeared too late in the atom… (#17405)
* fixes issue #13981: unsafe_writes block appeared too late in the atomic_move
workflow. This led to errno.EBUSY to not be managed in the context of
issue #!#981

* Reduce changes to fix #13981

* Abstract the unsafe_writes fallback into a helper method.
Explicitly try/except os.rename part of the code and call this helper method.
If the code fails in shutil.copy2 or shutil.move this should not be related to issue #13981
since they write to b_tmp_dest_name.
(as suggested by @abadger)

* Check if unsafe_writes in the caller, not in _unsafe_writes.
That way the function call reads as "Do an unsafe write"
and not as "I think we should do an unsafe_write.
2016-09-22 11:31:35 -04:00
..
cli win_shell/win_command changes + tests (#17557) 2016-09-15 11:25:56 -07:00
compat Move py34 mock_open compat to compat/test/mock (#17157) 2016-08-19 18:11:24 -04:00
config Making the switch to v2 2015-05-03 21:47:26 -05:00
errors Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423) 2016-09-06 22:54:17 -07:00
executor Create a raw lookup for hostvars that does not template the data 2016-09-21 13:16:08 -05:00
galaxy Iterate through role paths when installing roles (#17487) 2016-09-09 16:50:50 -04:00
inventory Improve inventory script error messages. (#17589) 2016-09-15 15:42:57 -04:00
module_utils fixes issue #13981: unsafe_writes block appeared too late in the atom… (#17405) 2016-09-22 11:31:35 -04:00
modules Update submodule refs 2016-09-21 20:42:22 -07:00
parsing Allow for empty source in dwim_path_relative_stack 2016-09-21 16:16:14 -05:00
playbook Remove _load_hosts() from Play initialization as it's no longer needed and it breaks using extra_vars defining a list for hosts (#17699) 2016-09-21 17:25:54 -07:00
plugins changed missing file error to warning for lookups (#16800) 2016-09-20 15:05:11 -04:00
template Support late evaluation, suppress warnings on SyntaxError (#17462) 2016-09-09 09:33:23 -04:00
utils Add oVirt support to ansible/module_utils module (#17364) 2016-09-21 12:41:36 -04:00
vars Create a raw lookup for hostvars that does not template the data 2016-09-21 13:16:08 -05:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
constants.py Remove test-docs from module search ignore list. (#17670) 2016-09-20 15:38:46 -04:00
release.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
test-requirements.txt Making the switch to v2 2015-05-03 21:47:26 -05:00