first commit
This commit is contained in:
3
roles/apk/tasks/main.yml
Normal file
3
roles/apk/tasks/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- import_tasks: "{{task|lower}}.yml"
|
||||
|
9
roles/apk/tasks/revert_apk.yml
Normal file
9
roles/apk/tasks/revert_apk.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: check whether {{apk}}.apk.bak exists
|
||||
shell: cd {{root_dir}} && [ -f {{apk}}.apk.bak ]
|
||||
ignore_errors: true
|
||||
register: result
|
||||
- name: revert {{apk}}.apk.bak
|
||||
when: result is succeeded
|
||||
shell: cd {{root_dir}} && rm -f {{apk}}.apk && mv {{apk}}.apk.bak {{apk}}.apk
|
||||
|
15
roles/apk/tasks/update_apk.yml
Normal file
15
roles/apk/tasks/update_apk.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: upload {{apk}}.apk.zip
|
||||
copy: src=/gxfp/transfer/{{apk}}.apk.zip dest={{root_dir}}/{{apk}}.zip
|
||||
- name: check whether {{apk}}.apk exists
|
||||
shell: cd {{root_dir}} && [ -f {{apk}}.apk ]
|
||||
ignore_errors: true
|
||||
register: result
|
||||
- name: remove old {{apk}}.apk.bak
|
||||
shell: cd {{root_dir}} && rm -f {{apk}}.apk.bak
|
||||
- name: create current {{apk}}.apk.bak
|
||||
shell: cd {{root_dir}} && mv {{apk}}.apk {{apk}}.apk.bak
|
||||
when: result is succeeded
|
||||
- name: unzip new {{apk}}.zip
|
||||
shell: cd {{root_dir}} && unzip -o -qq {{apk}}.zip && rm -f {{apk}}.zip
|
||||
|
Reference in New Issue
Block a user