添加 XXXig 安装、卸载和更新脚本,包含服务管理功能和详细调试信息

This commit is contained in:
2026-06-10 12:01:28 +08:00
parent ea3913dddf
commit b14ea85320
3 changed files with 162 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
---
- name: XXXig 卸载脚本
hosts: all
become: yes
tasks:
- name: 下载卸载脚本
ansible.builtin.get_url:
url: https://gitea.bcde.io/wangdefa/xxxig/raw/branch/main/script/uninstall.sh
dest: /tmp/uninstall.sh
mode: '0755'
force: yes
validate_certs: yes
register: download_result
- name: 执行卸载脚本
ansible.builtin.shell: /tmp/uninstall.sh -y --purge
args:
executable: /bin/bash
register: script_output
changed_when: true
- name: 显示脚本执行结果
ansible.builtin.debug:
var: script_output.stdout_lines
- name: 清理临时脚本文件
ansible.builtin.file:
path: /tmp/uninstall.sh
state: absent