From 37ea0b0b1f041c02f04c2148e2ec0d6573be4585 Mon Sep 17 00:00:00 2001 From: jctanner Date: Thu, 11 Aug 2016 14:14:20 -0400 Subject: [PATCH] git: save changed submodules in check and non-check mode (#4392) --- source_control/git.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source_control/git.py b/source_control/git.py index acc52b28fdc..1e9b89df079 100644 --- a/source_control/git.py +++ b/source_control/git.py @@ -902,10 +902,12 @@ def main(): submodules_updated = False if recursive and not bare: submodules_updated = submodules_fetch(git_path, module, remote, track_submodules, dest) + if submodules_updated: + result.update(submodules_changed=submodules_updated) if module.check_mode: if submodules_updated: - result.update(changed=True, after=remote_head, submodules_changed=True) + result.update(changed=True, after=remote_head) else: result.update(changed=False, after=remote_head) module.exit_json(**result)