mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-03-26 19:03:16 +00:00
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:
9
examples/play-info-list.yml
Normal file
9
examples/play-info-list.yml
Normal 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
11
examples/play-info.yml
Normal 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
|
||||
Reference in New Issue
Block a user