diff --git a/roles/virtual/tasks/libvirt.yml b/roles/virtual/tasks/libvirt.yml index 6e01cc6..c24fd2d 100644 --- a/roles/virtual/tasks/libvirt.yml +++ b/roles/virtual/tasks/libvirt.yml @@ -1,5 +1,6 @@ --- -- name: install libvirt packages +- name: install libvirt packages [Ubuntu] + when: ansible_distribution == "Ubuntu" become: yes apt: update_cache: yes @@ -11,9 +12,26 @@ - libvirt-clients - bridge-utils +- name: install libvirt packages [Arch] + become: yes + community.general.pacman: + name: + - kvm + - qemu-full + - libvirt + - virt-manager + - virt-viewer + - name: ensure that your user is added to the group libvirtd become: yes user: name: "{{ ansible_user_id }}" append: yes groups: libvirt, kvm + +- name: enable default network + become: yes + shell: + cmd: + virsh net-autostart default + virsh net-start default diff --git a/roles/virtual/tasks/looking-glass-arch.yml b/roles/virtual/tasks/looking-glass-arch.yml new file mode 100644 index 0000000..96c551e --- /dev/null +++ b/roles/virtual/tasks/looking-glass-arch.yml @@ -0,0 +1,6 @@ +--- +- name: install IntelliJ [AUR] + shell: + cmd: + yay -S --needed --noconfirm \ + intellij-idea-ultimate-edition \ No newline at end of file diff --git a/roles/virtual/tasks/looking-glass.yml b/roles/virtual/tasks/looking-glass-compile.yml similarity index 100% rename from roles/virtual/tasks/looking-glass.yml rename to roles/virtual/tasks/looking-glass-compile.yml diff --git a/roles/virtual/tasks/main.yml b/roles/virtual/tasks/main.yml index be013b4..75e0a0f 100644 --- a/roles/virtual/tasks/main.yml +++ b/roles/virtual/tasks/main.yml @@ -1,4 +1,8 @@ --- - import_tasks: libvirt.yml -- import_tasks: looking-glass.yml +- import_tasks: looking-glass-compile.yml + when: ansible_distribution == "Ubuntu" + +- import_tasks: looking-glass-arch.yml + when: ansible_distribution == "Archlinux"