community.kubevirt.kubevirt – KubeVirt inventory source¶
Note
This plugin is part of the community.kubevirt collection (version 1.0.0).
To install it use: ansible-galaxy collection install community.kubevirt
.
To use it in a playbook, specify: community.kubevirt.kubevirt
.
Synopsis¶
Fetch running VirtualMachines for one or more namespaces.
Groups by namespace, namespace_vms and labels.
Uses kubevirt.(yml|yaml) YAML configuration file to set parameter values.
Requirements¶
The below requirements are needed on the local controller node that executes this inventory.
openshift >= 0.6
PyYAML >= 3.11
Parameters¶
Examples¶
# File must be named kubevirt.yaml or kubevirt.yml
# Authenticate with token, and return all virtual machines for all namespaces
plugin: community.kubevirt.kubevirt
connections:
- host: https://kubevirt.io
token: xxxxxxxxxxxxxxxx
ssl_verify: false
# Use default config (~/.kube/config) file and active context, and return vms with interfaces
# connected to network myovsnetwork and from namespace vms
plugin: community.kubevirt.kubevirt
connections:
- namespaces:
- vms
network_name: myovsnetwork
Authors¶
KubeVirt Team (@kubevirt)