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:
parent
764b4b20ec
commit
91969b8c67
1 changed files with 4 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue