From c946cee2eb6674e1aebff13dfdd13c5699125488 Mon Sep 17 00:00:00 2001 From: nkakouros Date: Thu, 8 Aug 2024 20:23:13 +0300 Subject: [PATCH] Fix gcp_compute_route module when there are warnings Closes #225 . --- plugins/modules/gcp_compute_route.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/modules/gcp_compute_route.py b/plugins/modules/gcp_compute_route.py index 12b8bec29..511fd284f 100644 --- a/plugins/modules/gcp_compute_route.py +++ b/plugins/modules/gcp_compute_route.py @@ -392,7 +392,10 @@ def main(): fetch = {} fetch.update({'changed': changed}) - + + if "warnings" in fetch: + fetch["warnings"] = fetch["warnings"][0]["message"] + module.exit_json(**fetch)