From 452a4ab78118966189eeedbd3523bf6559f061b2 Mon Sep 17 00:00:00 2001 From: Dominik Holler Date: Wed, 10 Oct 2018 16:01:45 +0200 Subject: [PATCH] Fix os_router ignores enable_snat: no (#45921) If enable_snat is False, this should be used to build the request, because the default value in the OpenStack Networking API is True. Fixes the issue #45915. --- lib/ansible/modules/cloud/openstack/os_router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/openstack/os_router.py b/lib/ansible/modules/cloud/openstack/os_router.py index 763098c7b55..643215028b3 100644 --- a/lib/ansible/modules/cloud/openstack/os_router.py +++ b/lib/ansible/modules/cloud/openstack/os_router.py @@ -306,7 +306,7 @@ def _build_kwargs(cloud, module, router, network): if network: kwargs['ext_gateway_net_id'] = network['id'] # can't send enable_snat unless we have a network - if module.params['enable_snat']: + if module.params.get('enable_snat') is not None: kwargs['enable_snat'] = module.params['enable_snat'] if module.params['external_fixed_ips']: