From a1b1cfa8a4b1e2e7a99a137161fb01f1cad40399 Mon Sep 17 00:00:00 2001 From: Frank Schiebel Date: Mon, 5 Feb 2024 09:00:12 +0100 Subject: [PATCH] Desktop nach Laptop --- qgm-laptop.yml | 110 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 96 insertions(+), 14 deletions(-) diff --git a/qgm-laptop.yml b/qgm-laptop.yml index 7c786b6..0a3c3ff 100644 --- a/qgm-laptop.yml +++ b/qgm-laptop.yml @@ -5,6 +5,9 @@ remote_user: ansible become: yes + vars_files: + - vars-qgsoftware.yml + vars: domain: "{{ ansible_domain }}" kerberize_uris: qgm.lan @@ -22,13 +25,6 @@ ## Local mirror for mscorefonts. Remove or leave empty to use no mirror: mirror_msfonts: http://netboot.qgm.lan/mscorefonts/ - ## Local Mirror for Greenfoot and BlueJ. Leave empty to skip installation of bluej and greenfoot - mirror_javadev: http://netboot.qgm.lan/javadev/ - ## Bluej/Greenfoot Versionen - bluej_target_version: "5.2.0" - greenfoot_target_version: "3.7.1" - - # Linbo Passwort rsyncsecret: Muster! ## Use grub-mkpasswd-pbkdf2: to calculate the password hash, this hash is for "geheim": @@ -46,13 +42,99 @@ extra_pkgs_bpo: [] # [ linux-image-amd64 ] roles: - #- lmn_network + - lmn_network #- up2date_debian - #- lmn_sssd - #- lmn_mount - #- lmn_kde - #- lmn_qgm - #- lmn_qgsddm + - lmn_sssd + - lmn_mount + - lmn_kde + - lmn_qgm + - lmn_qgsddm - lmn_qglaptop - #- lmn_printer + - lmn_printer #- kerberize + + + tasks: + - name: Fix unattended-upgrades + ansible.builtin.copy: + dest: /etc/apt/apt.conf.d/20auto-upgrades + content: | + APT::Periodic::Update-Package-Lists "1"; + APT::Periodic::Unattended-Upgrade "0"; + + - name: Prepare mount point for homes + ansible.builtin.file: + path: /srv/samba/schools/default-school/ + state: directory + mode: '0755' + + - name: Fix mount point permissions and owner + file: + path: "{{ item }}" + mode: '0755' + owner: root + group: root + loop: + - /srv/samba + - /srv/samba/schools + - /srv/samba/schools/default-school + + - name: Disable Grub submenus + lineinfile: + dest: /etc/default/grub + line: 'GRUB_DISABLE_SUBMENU=true' + insertafter: '^GRUB_TIMEOUT=.*' + notify: Run update-grub + + + - name: Check for the buggy kernel + stat: + path: /boot/vmlinuz-6.1.0-17-amd64 + register: bug + + - name: Check for the fixed kernel + stat: + path: /boot/vmlinuz-6.1.0-18-amd64 + register: fix + + - name: Work around kernel with CIFS regression + block: + - name: Make sure kernel package -16 is available + ansible.builtin.apt: + name: linux-image-6.1.0-16-amd64 + state: present + - name: Set 6.1.0-16 as default kernel in grub + lineinfile: + dest: /etc/default/grub + regexp: '^(GRUB_DEFAULT=).*' + line: '\g<1>"Debian GNU/Linux, with Linux 6.1.0-16-amd64"' + backrefs: yes + notify: Run update-grub + when: bug.stat.exists and not fix.stat.exists + + - name: Set latest kernel in grub if bug is fixed + lineinfile: + dest: /etc/default/grub + regexp: '^(GRUB_DEFAULT=).*' + line: '\g<1>0' + backrefs: yes + when: fix.stat.exists or not bug.stat.exists + notify: Run update-grub + + - name: Remove "unattended-upgrades" package + ansible.builtin.apt: + name: unattended-upgrades + state: absent + purge: True + + - name: Fix stuttering sound on HDMI + lineinfile: + dest: /etc/default/grub + regexp: '^(GRUB_CMDLINE_LINUX=).*' + line: '\g<1>"intel_iommu=on,igfx_off"' + backrefs: yes + when: "'lt-' in inventory_hostname" + notify: Run update-grub + + +