This commit is contained in:
suyl
2021-07-15 16:41:16 +08:00
parent 6f3748ebf9
commit 1388b353e0
2 changed files with 16 additions and 0 deletions

View File

@@ -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
View 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