ansible.virt_facts(3) - Linux man page

Name

virt_facts - Gather facts for a guest on libvirt

Description

This module gathers facts for a specific guest on a KVM host. These facts include hardware and network related information useful for provisioning (e.g. macaddress, uuid).

This module requires the libvirt python module.

Options

host

The KVM host the virtual server is located on.

guest

The virtual server to gather facts for on the KVM host.(required)."

Notes

This module ought to be run from a system that can access a KVM host directly. Either by using local_action, or using delegate_to.

Examples

action: virt_facts guest=$inventory_hostname_short
delegate_to: $virthost
only_if: "'$cmdb_hwmodel'.startswith('KVM')"

[{'hw_features': ['acpi', 'apic', 'pae'], 'hw_processor_count': 2, 'hw_memtotal_mb': 1024, 'hw_architecture': 'i686', 'module_hw': True, 'hw_machine': 'rhel5.4.0', 'hw_boot': ['hd'], 'hw_eth0': [{'macaddress': 'aa:bb:cc:dd:ee:ff', 'macaddress_dash': 'aa-bb-cc-dd-ee-ff', 'type': 'virtio', 'source': 'br0'}], 'hw_eth1': [{'macaddress': '00:11:22:33:44:55', 'macaddress_dash': '00-11-22-33-44-55', 'type': 'virtio', 'source': 'default'}], 'hw_product_uuid': '8cde06d5-df87-2a13-125d-86fbcc3bcfcd'}]

Author

Dag Wieers

See Also

ansible(1), http://ansible.github.com/modules.html#virt-facts