Fix and enable virtual role

This commit is contained in:
Przemek Grondek 2024-08-16 00:47:19 +02:00
parent 17cfd80fcb
commit 1da9fb16cf
3 changed files with 27 additions and 10 deletions

View File

@ -14,10 +14,10 @@
- laptop
- backup
- gaming
- virtual
# - ego
# - dev-flutter
# - virtual
# - terraform
- postinstall
vars:

View File

@ -1,5 +1,5 @@
---
- name: install libvirt packages [Ubuntu]
- name: "[Ubuntu] install libvirt packages"
when: ansible_distribution == "Ubuntu"
become: yes
apt:
@ -12,26 +12,44 @@
- libvirt-clients
- bridge-utils
- name: install libvirt packages [Arch]
- name: "[Arch] install libvirt packages"
become: yes
community.general.pacman:
name:
- kvm
- dnsmasq
- qemu-full
- libvirt
- virt-manager
- virt-viewer
- name: ensure that your user is added to the group libvirtd
- name: "[Ubuntu] ensure that your user is added to the group libvirtd"
when: ansible_distribution == "Ubuntu"
become: yes
user:
name: "{{ ansible_user_id }}"
append: yes
groups: libvirt, kvm
- name: enable default network
- name: "[Arch] ensure that your user is added to the group libvirtd"
when: ansible_distribution == "Ubuntu"
become: yes
user:
name: "{{ ansible_user_id }}"
append: yes
groups:
- libvirt-qemu
- qemu
- name: "[All] Enable service"
become: yes
ansible.builtin.systemd:
name: libvirtd
state: started
enabled: yes
- name: "[All] enable default network"
become: yes
shell:
cmd:
cmd: |
virsh net-autostart default
virsh net-start default

View File

@ -1,6 +1,5 @@
---
- name: install IntelliJ [AUR]
- name: "[Arch] install looking-glass"
shell:
cmd:
yay -S --needed --noconfirm \
intellij-idea-ultimate-edition
yay -S --needed --noconfirm looking-glass