mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
cloudstack: fix distinguish VPC and other networks (#18515)
This commit is contained in:
@@ -259,6 +259,9 @@ class AnsibleCloudStack(object):
|
||||
self.module.fail_json(msg="No networks available.")
|
||||
|
||||
for n in networks['network']:
|
||||
# ignore any VPC network if vpc param is not given
|
||||
if 'vpcid' in n and not self.get_vpc(key='id'):
|
||||
continue
|
||||
if network in [n['displaytext'], n['name'], n['id']]:
|
||||
self.network = n
|
||||
return self._get_by_key(key, self.network)
|
||||
|
||||
Reference in New Issue
Block a user