# SVN module: In check\_mode also check svn.has\_local\_mods()

**URL:** <https://forum.ansible.com/t/svn-module-in-check-mode-also-check-svn-has-local-mods/23238>\
**Category:** Ansible Project\
**Created:** [December 12, 2016, 4:12pm UTC](https://forum.ansible.com/t/svn-module-in-check-mode-also-check-svn-has-local-mods/23238 "2016-12-12T16:12:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vj.calvo](https://avatars.discourse-cdn.com/v4/letter/v/7993a0/32.png) [@vj.calvo](https://forum.ansible.com/u/vj.calvo)\
**Post date:** [December 12, 2016, 4:12pm UTC](https://forum.ansible.com/t/svn-module-in-check-mode-also-check-svn-has-local-mods/23238/1 "2016-12-12T16:12:48Z")

</div>

Hello,

For our deployment purposes using Ansible and SVN we would need to test (check mode, dry-run) before run the deployment playbook. If there is some missing file in the destination it will pass the check-mode but not the definitive one.

I looked at the code and I think it will do the job to add in current line 286:

if module.check\_mode or not update:

> if (svn.has\_local\_mods() && !force)  
> module.fail\_json(msg=“ERROR: modified files exist in the repository.”)  
> check, before, after = svn.needs\_update()  
> module.exit\_json(changed=check, before=before, after=after)

I am far from an expert on this, so I prefer to post it here so maybe someone can help and implement it! 🙂

Thanks and regards,

Victor.
