aa
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
- hosts: "{{ deploy_hosts }}"
|
- hosts: "{{ deploy_hosts }}"
|
||||||
remote_user: ubuntu
|
remote_user: ubuntu
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: copy shell
|
||||||
|
copy:
|
||||||
|
src: ../deploy/cleanup.sh
|
||||||
|
dest: "{{ deploy_dir }}/cleanup.sh"
|
||||||
|
owner: ubuntu
|
||||||
|
group: ubuntu
|
||||||
|
mode: 0777
|
||||||
- name: copy execute file to dest
|
- name: copy execute file to dest
|
||||||
copy:
|
copy:
|
||||||
src: ../jx-print
|
src: ../jx-print
|
||||||
|
|||||||
9
deploy/cleanup.sh
Normal file
9
deploy/cleanup.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ ! -d "backup" ]; then
|
||||||
|
mkdir backup
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ls jx-print.*~ > /dev/null 2>&1; then
|
||||||
|
mv jx-print.*~ backup/
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user