From 2ab15666748f7530506a8995fcb3c580099c8805 Mon Sep 17 00:00:00 2001 From: exu Date: Thu, 10 Oct 2024 21:45:05 +0200 Subject: [PATCH] Some more tasks --- roles/config/tasks/main.yml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/roles/config/tasks/main.yml b/roles/config/tasks/main.yml index 28a89300..4ba786d7 100644 --- a/roles/config/tasks/main.yml +++ b/roles/config/tasks/main.yml @@ -143,3 +143,53 @@ name: sddm enabled: true become: true + +- name: Add group for libvirt + ansible.builtin.user: + name: "{{ ansible_user_id }}" + groups: + - libvirt + append: true + when: ('libvirt' in ansible_facts.packages) + become: true + +- name: Create groups + ansible.builtin.group: + name: "{{ item }}" + state: present + loop: + - video # backlight + - render # GPU passing + - wireguard # wireguard + become: true + +- name: Add user to groups + ansible.builtin.user: + name: "{{ ansible_user_id }}" + groups: + - video # backlight + - render # GPU passing + - wireguard # wireguard + append: true + +- name: Set sudoers.d permissions + ansible.builtin.file: + path: /etc/sudoers.d + mode: "600" + owner: root + group: root + recurse: true + become: true + +- name: Make scripts executable + ansible.builin.file: + path: "{{ item }}" + mode: u+x,g+x,o+x + recurse: true + loop: + - "~/scripts" + - "~/.local/share/applications" + +- name: Reload applications + ansible.builtin.shell: + cmd: "update-desktop-database ~/.local/share/applications/"