diff --git a/awx_collection/plugins/modules/project_update.py b/awx_collection/plugins/modules/project_update.py index 6ccdca1fdb..38b55c8e3c 100644 --- a/awx_collection/plugins/modules/project_update.py +++ b/awx_collection/plugins/modules/project_update.py @@ -114,7 +114,12 @@ def main(): # Update the project result = module.post_endpoint(project['related']['update']) - if result['status_code'] != 202: + if result['status_code'] == 405: + module.fail_json( + msg="Unable to trigger a project update because the project scm_type ({0}) does not support it.".format(project['scm_type']), + response=result + ) + elif result['status_code'] != 202: module.fail_json(msg="Failed to update project, see response for details", response=result) module.json_output['changed'] = True