first commit
This commit is contained in:
commit
d1e95c0117
28 changed files with 301 additions and 0 deletions
34
tasks/hypervisor.yml
Normal file
34
tasks/hypervisor.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
- name: "Hypervisor | Scrap virtual machines"
|
||||
ansible.builtin.command: "virsh list --all"
|
||||
register: command_out
|
||||
changed_when: false
|
||||
|
||||
- name: "Hypervisor | Set VM fact"
|
||||
ansible.builtin.set_fact:
|
||||
qemu_vms: "{{ command_out.stdout }}"
|
||||
|
||||
- name: "Hypervisor | scrap virtual networks"
|
||||
ansible.builtin.command: "virsh net-list --all"
|
||||
register: command_out
|
||||
changed_when: false
|
||||
|
||||
- name: "Hypervisor | Set network fact"
|
||||
ansible.builtin.set_fact:
|
||||
qemu_network: "{{ command_out.stdout }}"
|
||||
|
||||
- name: "Hypervisor | Scrap virtual storage pools"
|
||||
ansible.builtin.command: "virsh pool-list --all"
|
||||
register: command_out
|
||||
changed_when: false
|
||||
|
||||
- name: "Hypervisor | Set storage fact"
|
||||
ansible.builtin.set_fact:
|
||||
qemu_pool: "{{ command_out.stdout }}"
|
||||
|
||||
- name: "Hypervisor | Write hypervisor startpage"
|
||||
ansible.builtin.template:
|
||||
src: hypervisor.txt.j2
|
||||
dest: "{{ cmdb.wiki_pages_path }}/servers/hypervisor.txt"
|
||||
mode: "0644"
|
||||
delegate_to: "{{ cmdb.wiki_server }}"
|
Loading…
Add table
Add a link
Reference in a new issue