Merge pull request #7836 from trbs/file_symlink_notexists_checkmode
OSError in file module for non existing symlink in check mode.
This commit is contained in:
commit
ce09a6dd47
1 changed files with 3 additions and 0 deletions
|
@ -251,6 +251,9 @@ def main():
|
|||
except OSError, e:
|
||||
module.fail_json(path=path, msg='Error while linking: %s' % str(e))
|
||||
|
||||
if module.check_mode and not os.path.exists(path):
|
||||
module.exit_json(dest=path, src=src, changed=changed)
|
||||
|
||||
changed = module.set_fs_attributes_if_different(file_args, changed)
|
||||
module.exit_json(dest=path, src=src, changed=changed)
|
||||
|
||||
|
|
Loading…
Reference in a new issue