ovirt_network: ovirt fix getting labels (#52499)
* ovirt fix getting labels * add changelog - ovirt_network_label_fail * add new line to changelog ovirt_network_label_fail
This commit is contained in:
parent
da77057566
commit
8d5811a611
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/52499-ovirt_network_label_fail.yaml
Normal file
2
changelogs/fragments/52499-ovirt_network_label_fail.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- ovirt_network - fix getting network labels (https://github.com/ansible/ansible/pull/52499).
|
|
@ -184,8 +184,8 @@ class NetworksModule(BaseModule):
|
|||
if self.param('label') is None:
|
||||
return
|
||||
|
||||
labels = [lbl.id for lbl in self._connection.follow_link(entity.network_labels)]
|
||||
labels_service = self._service.service(entity.id).network_labels_service()
|
||||
labels = [lbl.id for lbl in labels_service.list()]
|
||||
if not self.param('label') in labels:
|
||||
if not self._module.check_mode:
|
||||
if labels:
|
||||
|
|
Loading…
Reference in a new issue