Make roles
This commit is contained in:
parent
a544d20a3c
commit
9d2701be32
10 changed files with 129 additions and 345 deletions
3
roles/vm_base/handlers/main.yml
Normal file
3
roles/vm_base/handlers/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: Update grub
|
||||
ansible.builtin.command: update-grub
|
||||
50
roles/vm_base/tasks/main.yml
Normal file
50
roles/vm_base/tasks/main.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
- name: Install packages
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- lxqt
|
||||
- spice-vdagent
|
||||
- vim
|
||||
- git
|
||||
- mariadb-server
|
||||
- extrepo
|
||||
update_cache: true
|
||||
|
||||
- name: Remove screensaver
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- xscreensaver
|
||||
autoremove: true
|
||||
state: absent
|
||||
|
||||
- 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: Allow sudo without password for user
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sudoers.d/95-user
|
||||
line: 'user ALL=(root) NOPASSWD: ALL'
|
||||
create: true
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0700'
|
||||
|
||||
- name: Enable autologin for user
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
[Autologin]
|
||||
User=user
|
||||
Session=lxqt.desktop
|
||||
dest: /etc/sddm.conf
|
||||
mode: '0644'
|
||||
|
||||
- name: Set grub default to zero
|
||||
ansible.builtin.lineinfile:
|
||||
dest: /etc/default/grub
|
||||
regexp: '^GRUB_TIMEOUT=.*'
|
||||
line: GRUB_TIMEOUT=0
|
||||
notify: Update grub
|
||||
Loading…
Add table
Add a link
Reference in a new issue