- fix deploy error.
This commit is contained in:
@@ -2,8 +2,15 @@
|
|||||||
- hosts: "{{ deploy_hosts }}"
|
- hosts: "{{ deploy_hosts }}"
|
||||||
remote_user: ubuntu
|
remote_user: ubuntu
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: copy shell
|
||||||
|
copy:
|
||||||
|
src: ../deploy/cleanup.sh
|
||||||
|
dest: /jxdata/jx-callback/cleanup.sh
|
||||||
|
owner: ubuntu
|
||||||
|
group: ubuntu
|
||||||
|
mode: 0777
|
||||||
- name: cleanup previous backup files
|
- name: cleanup previous backup files
|
||||||
shell: cd /jxdata/jx-callback/deploy && ./cleanup.sh
|
shell: ./cleanup.sh
|
||||||
- name: copy execute file to dest
|
- name: copy execute file to dest
|
||||||
copy:
|
copy:
|
||||||
src: ../jx-callback
|
src: ../jx-callback
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ ! -d "../backup" ]; then
|
if [ ! -d "backup" ]; then
|
||||||
mkdir ../backup
|
mkdir backup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "../jx-callback.*~" ] then
|
if [ -f "jx-callback.*~" ] then
|
||||||
mv ../jx-callback.*~ ../backup/
|
mv jx-callback.*~ backup/
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user