neuro_ansible/update_jobs/install_desktop_packages.yaml

76 lines
2 KiB
YAML
Raw Normal View History

2024-04-09 14:52:12 +02:00
---
2024-04-20 02:23:17 +02:00
- name: install desktop stuff
2024-04-09 14:52:12 +02:00
hosts: all
become: true
tasks:
2024-04-20 02:23:17 +02:00
- name: block shutdown
blockinfile:
path: /etc/polkit-1/rules.d/55-inhibit-shutdown.rules
state: present
create: true
owner: "root"
group: "root"
mode: "0666"
block: |
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.login1.power-off") == 0 ||
action.id.indexOf("org.freedesktop.login1.reboot") == 0) {
return polkit.Result.AUTH_ADMIN;
}
});
- name: Make sure systemd-oomd service unit is stopped
systemd_service:
state: stopped
name: systemd-oomd
2024-04-12 17:38:02 +02:00
- name: Install base system
include_tasks: yaml_sub/install_base_system.yaml
2024-04-09 14:52:12 +02:00
- name: remove other files
include_tasks: yaml_sub/myrepo_clean.yaml
- name: update file myrepo.repo
2024-04-20 02:23:17 +02:00
2024-04-09 14:52:12 +02:00
import_tasks: yaml_sub/myrepo_data.yaml
- name: install movie tools
dnf:
2024-04-12 02:32:26 +02:00
name: mencoder,mmv,mplayer,HandBrake
2024-04-09 14:52:12 +02:00
state: present
update_cache: true
skip_broken: true
nobest: false
allowerasing: true
2024-04-12 02:32:26 +02:00
- name: make sure gdm is stopped
ansible.builtin.systemd_service:
name: gdm
state: stopped
enabled: false
2024-04-09 14:52:12 +02:00
2024-04-12 02:32:26 +02:00
- name: make sure lxdm is started
ansible.builtin.systemd_service:
name: lxdm
state: started
enabled: true
- name: Change default target to graphical.target
file:
src: /usr/lib/systemd/system/graphical.target
dest: /etc/systemd/system/default.target
state: link
2024-04-20 02:23:17 +02:00
- name: disable tracker
2024-04-12 02:32:26 +02:00
shell: 'for f in /etc/xdg/autostart/tracker*.desktop; do echo "Hidden=true" | tee -a "$f"; done'
2024-04-20 02:23:17 +02:00
- name: Make sure systemd-oomd service unit is started
systemd_service:
state: started
name: systemd-oomd
- name: stop shutdown embargo
ansible.builtin.file:
path: /etc/polkit-1/rules.d/55-inhibit-shutdown.rules
state: "absent"