From 32f345c567f599cca75c26fcc96a328e0a8ea1f9 Mon Sep 17 00:00:00 2001 From: Wei Jihui Date: Fri, 12 Sep 2025 17:58:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Duninstall=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E5=8C=85=E5=90=8D=E4=B8=8D=E5=8C=B9=E9=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/dotnet-8/config.yaml | 34 +++++++++---------- .../workspace/roles/uninstall/tasks/main.yml | 7 ++++ plugins/dotnet-9/config.yaml | 34 +++++++++---------- .../workspace/roles/uninstall/tasks/main.yml | 7 ++++ 4 files changed, 48 insertions(+), 34 deletions(-) diff --git a/plugins/dotnet-8/config.yaml b/plugins/dotnet-8/config.yaml index ad78d3f..b7236e3 100644 --- a/plugins/dotnet-8/config.yaml +++ b/plugins/dotnet-8/config.yaml @@ -17,26 +17,26 @@ all: # 包列表 - 生产环境 dotnet8_production_packages: - - "dotnet-host-8.0.4" - - "dotnet-hostfxr-8.0-8.0.4" - - "dotnet-runtime-8.0-8.0.4" - - "aspnetcore-runtime-8.0-8.0.4" + - "dotnet-host-8.0.4-*" + - "dotnet-hostfxr-8.0-8.0.4-*" + - "dotnet-runtime-8.0-8.0.4-*" + - "aspnetcore-runtime-8.0-8.0.4-*" # 包列表 - 开发环境(包含SDK和调试包) dotnet8_development_packages: - - "dotnet-host-8.0.4" - - "dotnet-hostfxr-8.0-8.0.4" - - "dotnet-runtime-8.0-8.0.4" - - "dotnet-runtime-dbg-8.0-8.0.4" - - "aspnetcore-runtime-8.0-8.0.4" - - "aspnetcore-runtime-dbg-8.0-8.0.4" - - "dotnet-sdk-8.0-8.0.104" - - "dotnet-sdk-dbg-8.0-8.0.104" - - "dotnet-apphost-pack-8.0-8.0.4" - - "dotnet-targeting-pack-8.0-8.0.4" - - "aspnetcore-targeting-pack-8.0-8.0.4" - - "dotnet-templates-8.0-8.0.104" - - "netstandard-targeting-pack-2.1-8.0.104" + - "dotnet-host-8.0.4-*" + - "dotnet-hostfxr-8.0-8.0.4-*" + - "dotnet-runtime-8.0-8.0.4-*" + - "dotnet-runtime-dbg-8.0-8.0.4-*" + - "aspnetcore-runtime-8.0-8.0.4-*" + - "aspnetcore-runtime-dbg-8.0-8.0.4-*" + - "dotnet-sdk-8.0-8.0.104-*" + - "dotnet-sdk-dbg-8.0-8.0.104-*" + - "dotnet-apphost-pack-8.0-8.0.4-*" + - "dotnet-targeting-pack-8.0-8.0.4-*" + - "aspnetcore-targeting-pack-8.0-8.0.4-*" + - "dotnet-templates-8.0-8.0.104-*" + - "netstandard-targeting-pack-2.1-8.0.104-*" # 环境类型(production/development) environment_type: "development" \ No newline at end of file diff --git a/plugins/dotnet-8/workspace/roles/uninstall/tasks/main.yml b/plugins/dotnet-8/workspace/roles/uninstall/tasks/main.yml index 8908890..d931022 100644 --- a/plugins/dotnet-8/workspace/roles/uninstall/tasks/main.yml +++ b/plugins/dotnet-8/workspace/roles/uninstall/tasks/main.yml @@ -14,6 +14,13 @@ when: environment_type == 'development' ignore_errors: yes +- name: Verify .NET 8 has been removed + shell: rpm -qa | grep dotnet || true + register: dotnet_rpm_list + +- debug: + msg: "Remaining dotnet packages: {{ dotnet_rpm_list.stdout_lines }}" + - name: Remove .NET 8 repository file file: path: /etc/yum.repos.d/dotnet-8.repo diff --git a/plugins/dotnet-9/config.yaml b/plugins/dotnet-9/config.yaml index 498f388..1c52196 100644 --- a/plugins/dotnet-9/config.yaml +++ b/plugins/dotnet-9/config.yaml @@ -17,26 +17,26 @@ all: # 包列表 - 生产环境 dotnet9_production_packages: - - "dotnet-host-9.0.8" - - "dotnet-hostfxr-9.0-9.0.8" - - "dotnet-runtime-9.0-9.0.8" - - "aspnetcore-runtime-9.0-9.0.8" + - "dotnet-host-9.0.8-*" + - "dotnet-hostfxr-9.0-9.0.8-*" + - "dotnet-runtime-9.0-9.0.8-*" + - "aspnetcore-runtime-9.0-9.0.8-*" # 包列表 - 开发环境(包含SDK和调试包) dotnet9_development_packages: - - "dotnet-host-9.0.8" - - "dotnet-hostfxr-9.0-9.0.8" - - "dotnet-runtime-9.0-9.0.8" - - "dotnet-runtime-dbg-9.0-9.0.8" - - "aspnetcore-runtime-9.0-9.0.8" - - "aspnetcore-runtime-dbg-9.0-9.0.8" - - "dotnet-sdk-9.0-9.0.109" - - "dotnet-sdk-dbg-9.0-9.0.109" - - "dotnet-apphost-pack-9.0-9.0.8" - - "dotnet-targeting-pack-9.0-9.0.8" - - "aspnetcore-targeting-pack-9.0-9.0.8" - - "dotnet-templates-9.0-9.0.109" - - "netstandard-targeting-pack-2.1-9.0.109" + - "dotnet-host-9.0.8-*" + - "dotnet-hostfxr-9.0-9.0.8-*" + - "dotnet-runtime-9.0-9.0.8-*" + - "dotnet-runtime-dbg-9.0-9.0.8-*" + - "aspnetcore-runtime-9.0-9.0.8-*" + - "aspnetcore-runtime-dbg-9.0-9.0.8-*" + - "dotnet-sdk-9.0-9.0.109-*" + - "dotnet-sdk-dbg-9.0-9.0.109-*" + - "dotnet-apphost-pack-9.0-9.0.8-*" + - "dotnet-targeting-pack-9.0-9.0.8-*" + - "aspnetcore-targeting-pack-9.0-9.0.8-*" + - "dotnet-templates-9.0-9.0.109-*" + - "netstandard-targeting-pack-2.1-9.0.109-*" # 环境类型(production/development) environment_type: "development" \ No newline at end of file diff --git a/plugins/dotnet-9/workspace/roles/uninstall/tasks/main.yml b/plugins/dotnet-9/workspace/roles/uninstall/tasks/main.yml index fcb1f0a..020b4af 100644 --- a/plugins/dotnet-9/workspace/roles/uninstall/tasks/main.yml +++ b/plugins/dotnet-9/workspace/roles/uninstall/tasks/main.yml @@ -14,6 +14,13 @@ when: environment_type == 'development' ignore_errors: yes +- name: Verify .NET 9 has been removed + shell: rpm -qa | grep dotnet || true + register: dotnet_rpm_list + +- debug: + msg: "Remaining dotnet packages: {{ dotnet_rpm_list.stdout_lines }}" + - name: Remove .NET 9 repository file file: path: /etc/yum.repos.d/dotnet-9.repo -- Gitee