This commit is contained in:
pengtao 2021-06-15 17:49:31 +08:00
parent b03f743b6d
commit 73ade474b2
2 changed files with 0 additions and 28 deletions

17
1.yaml
View File

@ -1,17 +0,0 @@
- hosts: all
tasks:
- name: make directory for gz files
shell: "mkdir -p /data/backups_app"
- name: rsync deploy file
copy: src={{ source }} dest=/data/backups_app/{{ source }}
- name: decomp file
#shell: cd /data/backups_app/ && mkdir -p {{ tag }}
shell: "cd /data/backups_app/ && mkdir -p {{ desc_path }} && tar zxvf {{ source }} -C {{ desc_path }} && chown -R {{ user }}. {{ desc_path }}"
- name: create symbolic
shell: "cd {{ paths }} && rm -f {{ name }} && ln -s /data/backups_app/{{ tag }} {{ name }}"
- name: restart service
shell: "su {{ user }} -c 'cd /data/apps/{{ paths }}/{{ name }} && {{ start_script }}'"

View File

@ -1,11 +0,0 @@
- hosts: all
tasks:
- name: rsync deploy file
copy: src={{ source }} dest=/data/apps/{{ project }}/{{ dest_filename }}
- name: back old config file
shell: "rsync -avcp /data/apps/{{ project }}/keys /data/apps/{{ project }}/keys.old"
- name: decomp file
shell: "cd /data/apps/{{ project }} && tar zxvf {{ dest_filename }} "