From 45c57618b3c8e5b71f9af00c0270c31ad5373729 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 5 Jan 2017 01:23:21 +1100 Subject: [PATCH] Have AnsibleModule raise a failure of git is missing in git_config module (#19676) --- lib/ansible/modules/source_control/git_config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/modules/source_control/git_config.py b/lib/ansible/modules/source_control/git_config.py index 16f2457dd9..c9b5974a4f 100644 --- a/lib/ansible/modules/source_control/git_config.py +++ b/lib/ansible/modules/source_control/git_config.py @@ -171,9 +171,7 @@ def main(): required_one_of=[['list_all', 'name']], supports_check_mode=True, ) - git_path = module.get_bin_path('git') - if not git_path: - module.fail_json(msg="Could not find git. Please ensure it is installed.") + git_path = module.get_bin_path('git', True) params = module.params # We check error message for a pattern, so we need to make sure the messages appear in the form we're expecting.