1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Actually protect against use_default_subnetpool

We have a protection against a user setting use_default_subnetpool in
their playbook - but then we sure do pass the kwarg anyway. Maybe let's
not do that.
This commit is contained in:
Monty Taylor 2017-04-17 16:33:04 -05:00 committed by Brian Coca
parent 764b4b20ec
commit 91969b8c67

View file

@ -339,8 +339,7 @@ def main():
if state == 'present':
if not subnet:
subnet = cloud.create_subnet(
network_name, cidr,
kwargs = dict(
ip_version=ip_version,
enable_dhcp=enable_dhcp,
subnet_name=subnet_name,
@ -351,8 +350,10 @@ def main():
host_routes=host_routes,
ipv6_ra_mode=ipv6_ra_mode,
ipv6_address_mode=ipv6_a_mode,
use_default_subnetpool=use_default_subnetpool,
tenant_id=project_id)
if use_default_subnetpool:
kwargs['use_default_subnetpool'] = use_default_subnetpool
subnet = cloud.create_subnet(network_name, cidr, **kwargs)
changed = True
else:
if _needs_update(subnet, module, cloud):