Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enable_snat parameter #44418

Merged
merged 1 commit into from
Aug 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/ansible/modules/cloud/openstack/os_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
description:
- Enable Source NAT (SNAT) attribute.
type: bool
default: 'yes'
network:
description:
- Unique name or ID of the external gateway network.
Expand Down Expand Up @@ -307,7 +306,8 @@ 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
kwargs['enable_snat'] = module.params['enable_snat']
if module.params['enable_snat']:
kwargs['enable_snat'] = module.params['enable_snat']

if module.params['external_fixed_ips']:
kwargs['ext_fixed_ips'] = []
Expand Down Expand Up @@ -371,7 +371,7 @@ def main():
state=dict(default='present', choices=['absent', 'present']),
name=dict(required=True),
admin_state_up=dict(type='bool', default=True),
enable_snat=dict(type='bool', default=True),
enable_snat=dict(type='bool'),
network=dict(default=None),
interfaces=dict(type='list', default=None),
external_fixed_ips=dict(type='list', default=None),
Expand Down