ansible-collections / community.libvirt

Manage libvirt with Ansible
http://galaxy.ansible.com/community/libvirt
GNU General Public License v3.0
61 stars 42 forks source link

virt_net facts requires name to be specified #75

Closed braindevices closed 3 years ago

braindevices commented 3 years ago
SUMMARY

in the example of the document, it does not require name at all:

# Gather facts about networks
# Facts will be available as 'ansible_libvirt_networks'
- community.libvirt.virt_net:
    command: facts

But in practical it requires name. Even worse, if I have several networks, the ansible_libvirt_networks only store the facts of last network called with virt_net.facts. It should not require any name and if multiple names are given it should just put all facts of all networks in ansible_libvirt_networks

ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
both 2.10.9 and 2.11.1
community.libvirt             1.0.1
CONFIGURATION
OS / ENVIRONMENT

Ubuntu 2004, Fedora 33, Centos8

STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
{"changed": false, "msg": "missing required arguments: name"}
braindevices commented 3 years ago

this is actually an ansible bug. The ansible some how kept an very old version of ansible_collections in ~/.ansible. Even thought the ansible-galaxy collection list show all collections are at latest version, the actual ansible run transfer the old modules to remote.