forked from raknas999/GOL-Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml
More file actions
31 lines (30 loc) · 1021 Bytes
/
deploy.yml
File metadata and controls
31 lines (30 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- hosts: webservers
become: true
tasks:
- name: Stop Tomcat
service: name=tomcat state=stopped
- name: Check that war file exist
stat:
path: /usr/share/tomcat/webapps/gameoflife.war
register: stat_result
- name: Delete the war file, if it exist already
file:
path: /usr/share/tomcat/webapps/gameoflife.war
state: absent
when: stat_result.stat.exists == True
- name: Check that GAMEOFLIFE dir exist
stat:
path: /usr/share/tomcat/webapps/gameoflife
register: stat_result
- name: Delete the GAMEOFLIFE dir, if it exist already
file:
path: /usr/share/tomcat/webapps/gameoflife
state: absent
when: stat_result.stat.exists == True
- name: Deploy War File
get_url:
url: http://3.21.186.112:8081:8081/nexus/service/local/artifact/maven/redirect?r=releases&g=com.wakaleo.gameoflife&a=gameoflife&p=war&v=LATEST
dest: /usr/share/tomcat/webapps/gameoflife.war
- name: Start Tomcat
service: name=tomcat state=started