Add roles for dev and vm tools
This commit is contained in:
parent
b9eac3b2cc
commit
6e855b6849
6
main.yml
6
main.yml
|
@ -1,6 +1,8 @@
|
|||
- hosts: localhost
|
||||
roles:
|
||||
- common
|
||||
- desktop-environment # WM, App Launcher etc.
|
||||
- desktop-environment # Sway, App Launcher etc.
|
||||
- essential-tools # Thunar File Manager, Firefox, KeePassXC, Nextcloud Desktop
|
||||
#- media-tools # Spotify, VLC
|
||||
#- media-tools # Spotify, VLC
|
||||
#- dev-tools # Visual Studio Code, Node.js
|
||||
#- vm-tools # QEMU / KVM, libvirt, virt-manager
|
26
roles/dev-tools/tasks/main.yml
Normal file
26
roles/dev-tools/tasks/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: Add Visual Studio Code repository
|
||||
become: yes
|
||||
deb822_repository:
|
||||
name: vscode
|
||||
types: deb
|
||||
uris: https://packages.microsoft.com/repos/code
|
||||
suites: stable
|
||||
components: main
|
||||
signed_by: https://packages.microsoft.com/keys/microsoft.asc
|
||||
state: present
|
||||
enabled: yes
|
||||
|
||||
- name: Install packages
|
||||
become: yes
|
||||
apt:
|
||||
state: latest
|
||||
update_cache: true
|
||||
install_recommends: false
|
||||
name:
|
||||
- code
|
||||
- nodejs
|
||||
- npm
|
||||
|
||||
- name: Install yarn
|
||||
become: yes
|
||||
ansible.builtin.command: npm install -g yarn
|
27
roles/vm-tools/tasks/main.yml
Normal file
27
roles/vm-tools/tasks/main.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
- name: Install packages for qemu-kvm
|
||||
become: yes
|
||||
apt:
|
||||
state: latest
|
||||
install_recommends: false
|
||||
name:
|
||||
- qemu-kvm
|
||||
- qemu-system
|
||||
- libvirt-daemon
|
||||
- libvirt-daemon-system
|
||||
- ovmf
|
||||
- virt-manager
|
||||
|
||||
- name: Ensure group "libvirt" exists
|
||||
become: yes
|
||||
ansible.builtin.group:
|
||||
name: libvirt
|
||||
state: present
|
||||
|
||||
- name: Add user to group "libvirt"
|
||||
become: yes
|
||||
ansible.builtin.user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
state: present
|
||||
groups:
|
||||
- libvirt
|
||||
append: true
|
Loading…
Reference in a new issue