SVN module: In check_mode also check svn.has_local_mods()

7 views
Skip to first unread message

vj.c...@turyelectro.com

unread,
Dec 12, 2016, 1:16:35 PM12/12/16
to Ansible Project
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.
Reply all
Reply to author
Forward
0 new messages