diff --git a/lib/ansible/modules/cloud/google/gcp_compute_address.py b/lib/ansible/modules/cloud/google/gcp_compute_address.py index 73f6e3101129b3..9f6489c65cda0a 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_address.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_address.py @@ -282,7 +282,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py index 9d9d5b77cf19b9..2a3374a727794b 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py @@ -225,7 +225,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py index a6f75da34c1094..e467219057575c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py @@ -753,7 +753,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_disk.py b/lib/ansible/modules/cloud/google/gcp_compute_disk.py index 46fc55f0141530..f407b17dc9a2a6 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_disk.py @@ -515,7 +515,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py index 02bafb12a5523b..7f62d9bad4a989 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py @@ -524,7 +524,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py index 069acd0efa805b..a2d59e5bc001ba 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py @@ -512,7 +512,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_address.py b/lib/ansible/modules/cloud/google/gcp_compute_global_address.py index 36f06ec7426da1..fd6f62dbbe2bad 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_global_address.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_global_address.py @@ -233,7 +233,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py index ff08edf526f25e..48ae25563e2353 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py @@ -507,7 +507,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py index f68ed01154fcb7..5659da69d40ed6 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py @@ -633,7 +633,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py index dd2ae039e695da..b3231f0794e5e3 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py @@ -287,7 +287,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py index 72e9832b284b7d..157ab8a5c5b2af 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py @@ -284,7 +284,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image.py b/lib/ansible/modules/cloud/google/gcp_compute_image.py index 5dd4af431022c5..6cf491836e6042 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image.py @@ -528,7 +528,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance.py b/lib/ansible/modules/cloud/google/gcp_compute_instance.py index 1d2bcb3eb71b9c..37beebab39a679 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance.py @@ -1046,7 +1046,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py index e31aef2430ba51..0e8a38e298b06b 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py @@ -310,7 +310,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py index 04fecfad4dc7ec..a926b3b5966fb1 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py @@ -407,7 +407,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py index 9bdf4273d5df88..d60fdc310b6df0 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py @@ -990,7 +990,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py index ef86aa2c472e7b..4ea397ac20ab74 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py @@ -261,7 +261,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_network.py b/lib/ansible/modules/cloud/google/gcp_compute_network.py index ac3907046495c5..86555c285927d7 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_network.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_network.py @@ -279,7 +279,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py index d13b3f739130bf..914ace9cb29e05 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py @@ -455,7 +455,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_route.py b/lib/ansible/modules/cloud/google/gcp_compute_route.py index cb9a90083dab72..3df7616b872b14 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_route.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_route.py @@ -326,7 +326,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router.py b/lib/ansible/modules/cloud/google/gcp_compute_router.py index e0d5888b1c3e2d..9b2d908fb1d403 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_router.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_router.py @@ -330,7 +330,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py b/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py index 02727340f20307..892c0aa5f9c746 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py @@ -234,7 +234,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_ssl_policy.py b/lib/ansible/modules/cloud/google/gcp_compute_ssl_policy.py index ef86a6ee8877e6..cd513ec31de33f 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_ssl_policy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_ssl_policy.py @@ -272,7 +272,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py index e3d89213d1edcc..ed18a8f8880fd0 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py @@ -399,7 +399,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py index 0e399174114509..4a00fa0a6cf8b6 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py @@ -267,7 +267,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py index 5e05f2b1018768..9f4ff82393e783 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py @@ -395,7 +395,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py index 778926dcd72a9c..604d3e61ae2078 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py @@ -321,7 +321,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py index aef1f1505f0a22..97ff051e30b384 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py @@ -380,7 +380,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py index 73931e13379825..c13b4317787d61 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py @@ -292,7 +292,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py index ae98e414f2677e..cdc6fcd1ce7ae6 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py @@ -238,7 +238,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py index 2cff11af11d480..3cb7564d07da3a 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py @@ -454,7 +454,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py index 9806a275d4fd35..ad848840f3c7f2 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py @@ -374,7 +374,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_container_cluster.py b/lib/ansible/modules/cloud/google/gcp_container_cluster.py index 5e25cb83f084d0..895c0213885c0b 100644 --- a/lib/ansible/modules/cloud/google/gcp_container_cluster.py +++ b/lib/ansible/modules/cloud/google/gcp_container_cluster.py @@ -699,7 +699,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_container_node_pool.py b/lib/ansible/modules/cloud/google/gcp_container_node_pool.py index 9d0a93d09b3459..7964da6f14d12d 100644 --- a/lib/ansible/modules/cloud/google/gcp_container_node_pool.py +++ b/lib/ansible/modules/cloud/google/gcp_container_node_pool.py @@ -526,7 +526,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py b/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py index 4a67c6b2383905..05f2ae7dff717c 100644 --- a/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py +++ b/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py @@ -243,7 +243,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py index 20dc2e7f961295..24c89d32c5be38 100644 --- a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py +++ b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py @@ -243,7 +243,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_iam_service_account.py b/lib/ansible/modules/cloud/google/gcp_iam_service_account.py index 71267ae250b76d..06f10ec0739a41 100644 --- a/lib/ansible/modules/cloud/google/gcp_iam_service_account.py +++ b/lib/ansible/modules/cloud/google/gcp_iam_service_account.py @@ -179,7 +179,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py index 31732b89e39acc..ee356d2f6f9cb9 100644 --- a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py +++ b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py @@ -265,7 +265,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py b/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py index 137bee742346ed..83198c4562693d 100644 --- a/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py +++ b/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py @@ -146,7 +146,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py b/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py index fe46412bf2a80c..925bfd4880b1c8 100644 --- a/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py +++ b/lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py @@ -244,7 +244,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_database.py b/lib/ansible/modules/cloud/google/gcp_spanner_database.py index 10e7758e4c3f00..e812f961b543d9 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_database.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_database.py @@ -201,7 +201,7 @@ def resource_to_request(module): request = encode_request(request, module) return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_instance.py b/lib/ansible/modules/cloud/google/gcp_spanner_instance.py index 41d2c009f74817..b7ca710683d597 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_instance.py @@ -238,7 +238,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_sql_database.py b/lib/ansible/modules/cloud/google/gcp_sql_database.py index 46b41d6b15b901..f694a67664c15e 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_database.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_database.py @@ -206,7 +206,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_sql_instance.py b/lib/ansible/modules/cloud/google/gcp_sql_instance.py index d2b45bf3f434f9..1b648d7cfc01ce 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_instance.py @@ -674,7 +674,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_sql_user.py b/lib/ansible/modules/cloud/google/gcp_sql_user.py index 21df4cc224e195..f790adeb6ef09e 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_user.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_user.py @@ -203,7 +203,7 @@ def resource_to_request(module): request = {u'kind': 'sql#user', u'password': module.params.get('password'), u'host': module.params.get('host'), u'name': module.params.get('name')} return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py index a98302cd02181e..09803f4180cb05 100644 --- a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py +++ b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py @@ -921,7 +921,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals diff --git a/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py b/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py index cb6a0b12be03fd..b766d58e6d2aa6 100644 --- a/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py +++ b/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py @@ -272,7 +272,7 @@ def resource_to_request(module): } return_vals = {} for k, v in request.items(): - if v or v is False: + if v is not None: return_vals[k] = v return return_vals