ansible/roles/tomcat/tasks/revert_war.yml
2021-08-28 23:54:41 +08:00

10 lines
308 B
YAML

---
- name: check whether {{app}}.war.bak exists
shell: cd {{root_dir}}/webapps/ && [ -f {{app}}.war.bak ]
ignore_errors: true
register: result
- name: revert {{app}}.war.bak
when: result is succeeded
shell: cd {{root_dir}}/webapps/ && rm -rf {{app}}.war {{app}} && mv {{app}}.war.bak {{app}}.war