From fb4041b6f2bb120be051332318bcad40ce5c0a78 Mon Sep 17 00:00:00 2001 From: Raphael Dannecker Date: Tue, 30 Jan 2024 15:17:02 +0100 Subject: [PATCH] remove old desktop VM-starters --- lmn-client.yml | 25 +++++++++++++++++++++++++ roles/lmn_vm/tasks/main.yml | 9 +++++++++ 2 files changed, 34 insertions(+) diff --git a/lmn-client.yml b/lmn-client.yml index 41ade4d..8303300 100644 --- a/lmn-client.yml +++ b/lmn-client.yml @@ -197,6 +197,16 @@ enabled: false when: rmlpr.stat.exists + - name: check if vmimage-torrent.service is installed + stat: path=/etc/systemd/system/vmimage-torrent.service + register: vmimagetorrent + + - name: disable vmimage-torrent.service + systemd: + name: vmimage-torrent.service + enabled: false + when: vmimagetorrent.stat.exists + - name: Remove deprecated files and directories file: path: "{{ item }}" @@ -209,6 +219,21 @@ - /etc/sudoers.d/90-lmn-sudotools - /etc/systemd/system/rmlpr.service - /etc/systemd/system/rmlpr.timer + - /usr/local/bin/sync-vm.sh + - /usr/local/bin/run-vm.sh + - /usr/local/bin/rebase-vm.sh + - /usr/local/bin/create-vm.sh + - /usr/local/bin/upload-vm.sh + - /usr/local/bin/vmimage-torrent + - /etc/systemd/system/vmimage-torrent.service + - /usr/local/bin/linbo-torrenthelper.sh + - /usr/local/bin/link-images.sh + - /usr/local/bin/start-virtiofsd.sh + - /etc/sudoers.d/90-lmn-upload-vm + - /etc/sudoers.d/90-lmn-sync-vm + - /etc/sudoers.d/90-lmn-startvirtiofsd + - /etc/sudoers.d/90-lmn-link-images + - /etc/rsync.secret ## bookworm fixes/hacks: - name: Work around sddm hang on shutdown diff --git a/roles/lmn_vm/tasks/main.yml b/roles/lmn_vm/tasks/main.yml index 893e8fd..3227054 100644 --- a/roles/lmn_vm/tasks/main.yml +++ b/roles/lmn_vm/tasks/main.yml @@ -260,6 +260,15 @@ dest: /etc/xdg/menus/applications-merged/ notify: Run update-desktop-database +- name: check if sync.desktop is installed + stat: path=/usr/local/share/applications/sync.desktop + register: syncdesktop + +- name: remove deprecated desktop-files + ansible.builtin.shell: rm -f /usr/local/share/applications/*.desktop + when: not syncdesktop.stat.exists + notify: Run update-desktop-database + - name: Copy initial sync starter ansible.builtin.copy: src: sync.desktop