kubevirt_vm_info: Add info module for VirtualMachines

This adds the kubevirt_vm_info module, which returns the same results as
the kubevirt_vm module, but is limited to read-only functionality.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2023-09-05 18:11:19 +02:00
parent 6b360aa377
commit 6486766b11
8 changed files with 416 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
- name: Playbook describing a virtual machine
hosts: localhost
tasks:
- name: Describe VM
kubevirt.core.kubevirt_vm_info:
register: result
- name: Print return information from the previous task
ansible.builtin.debug:
var: result

11
examples/play-info.yml Normal file
View File

@@ -0,0 +1,11 @@
- name: Playbook describing a virtual machine
hosts: localhost
tasks:
- name: Describe VM
kubevirt.core.kubevirt_vm_info:
name: testvm
namespace: default
register: result
- name: Print return information from the previous task
ansible.builtin.debug:
var: result