Skip to content

Commit

Permalink
ansible/chore: Rename QEMU occurrences to libvirt
Browse files Browse the repository at this point in the history
Rename any QEMU occurrence to reference libvirt instead, as Ansible does
not work directly with QEMU or KVM.

Signed-off-by: Dimitris Poulopoulos <[email protected]>
  • Loading branch information
dpoulopoulos committed Mar 11, 2024
1 parent e474dfd commit ba0b688
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
3 changes: 0 additions & 3 deletions ansible/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ all:

check:
ansible-playbook $(DEFAULT_ARGS) $(ANSIBLE_DIFF) --check site.yaml

qemu:
ansible-playbook $(DEFAULT_ARGS) $(ANSIBLE_DIFF) --tags qemu-vm site.yaml
2 changes: 1 addition & 1 deletion ansible/hosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ all:
vm_host: boogie
pxe_server: pxe-server
children:
qemu:
libvirt:
hosts:
k8s-dev1-ctrl:
vm_vcpus: 4
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
throttle: 1
notify: reload-inventory

- name: Create the QEMU VM
- name: Create the libvirt VM
become: true
delegate_to: "{{ vm_host }}"
block:
Expand All @@ -39,7 +39,7 @@
command: define
xml: "{{ lookup('template', 'vm-template.xml.j2') }}"

- name: Start the QEMU VM
- name: Start the libvirt VM
community.libvirt.virt:
name: "{{ inventory_hostname }}"
command: start
Expand Down
12 changes: 6 additions & 6 deletions ansible/site.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: Create QEMU VMs
hosts: qemu
- name: Create libvirt VMs
hosts: libvirt
gather_facts: false
roles:
- role: qemu-vm
- role: libvirt
vars:
pxe_done: false

Expand All @@ -18,10 +18,10 @@
roles:
- role: pxe-client

- name: Start QEMU VMs
hosts: qemu
- name: Start libvirt VMs
hosts: libvirt
gather_facts: false
roles:
- role: qemu-vm
- role: libvirt
vars:
pxe_done: true
3 changes: 3 additions & 0 deletions ansible/state.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
k8s-dev1-ctrl mac_address=52:54:00:11:45:d4
k8s-dev1-worker1 mac_address=52:54:00:e2:b1:5b
k8s-dev1-worker2 mac_address=52:54:00:16:f4:20
k8s-dev1-ctrl state=present
k8s-dev1-worker1 state=present
k8s-dev1-worker2 state=present

0 comments on commit ba0b688

Please sign in to comment.