Use default user

This commit is contained in:
Raphael Dannecker 2026-01-23 16:26:18 +01:00
parent cede18459f
commit 6461fa835f
6 changed files with 289 additions and 10 deletions

View file

@ -4,7 +4,7 @@
- name: Install base vm
hosts: all
become: true
remote_user: ansible
remote_user: root
roles:
- vm_mount
tasks:
@ -14,18 +14,50 @@
name:
- lxqt
- spice-vdagent
- vim
- git
- dolphin
- mariadb-server
- extrepo
update_cache: true
- name: Add user
ansible.builtin.user:
name: user
comment: "Local Guest User,,,"
shell: /bin/bash
uid: 1001
password_expire_min: 99999
createhome: true
password: password
- name: Remove screensaver
ansible.builtin.apt:
name:
- xscreensaver
autoremove: true
state: absent
- name: Set link to dolphin
ansible.builtin.file:
src: /usr/bin/dolphin
dest: /usr/local/bin/pcmanfm-qt
state: link
- name: Activate contrib and non-free repos for extrepo
ansible.builtin.lineinfile:
dest: /etc/extrepo/config.yaml
regexp: '^#\s*-\s*(contrib|non-free)'
line: '- \1'
backrefs: true
- name: Enable VirtualBox repository using extrepo
ansible.builtin.command:
cmd: extrepo enable virtualbox
- name: Install Virtualbox
ansible.builtin.apt:
name:
- virtualbox-7.2
update_cache: true
- name: Copy user home
ansible.builtin.copy:
src: user/
dest: /home/user
mode: '0644'
owner: user
group: user
- name: Allow sudo without password for user
ansible.builtin.lineinfile: