脚本更新

This commit is contained in:
hahwu 2026-02-02 17:51:35 +08:00
parent c4ab720608
commit 99dca7ed8f

View File

@ -5,12 +5,12 @@
remote_user: root
vars:
goleaf_src: /data/devops/source/main
goleaf_dest: /usr/local/Goleaf
goleaf_dest: /data/Goleaf
config_src: /data/docs/tool/out/
config_dest: /usr/local/Goleaf/gamedata/config/
config_dest: /data/Goleaf/gamedata/config/
pack_script: /data/devops/pack.sh
tar_file: /usr/local/Goleaf.tar
tar_dest: /usr/local/Goleaf
tar_file: /data/Goleaf.tar
tar_dest: /data/Goleaf
tasks:
@ -30,7 +30,7 @@
shell: sh /data/devops/pack.sh
delegate_to: localhost
- name: backup goleaf
shell: mv /usr/local/Goleaf/main /usr/local/Goleaf/main.bak
shell: mv /data/Goleaf/main /data/Goleaf/main.bak
ignore_errors: yes
- name: copy goleaf
@ -52,19 +52,19 @@
delegate_to: localhost
- name: archive backup config
archive:
path: /usr/local/Goleaf/config/
dest: /usr/local/Goleaf/confbak.tar
path: /data/Goleaf/config/
dest: /data/Goleaf/confbak.tar
format: tar
ignore_errors: yes
- name: copy tar
copy:
src: /data/docs/tool/conf.tar
dest: /usr/local/Goleaf/conf.tar
dest: /data/Goleaf/conf.tar
- name: unarchive config
unarchive:
src: /usr/local/Goleaf/conf.tar
dest: /usr/local/Goleaf/config/
src: /data/Goleaf/conf.tar
dest: /data/Goleaf/config/
remote_src: yes
# extra_opts: [--overwrite]
- name: remove tar
shell: rm -f /usr/local/Goleaf/conf.tar
shell: rm -f /data/Goleaf/conf.tar