-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdeploy.yml
48 lines (42 loc) · 1.16 KB
/
deploy.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- name: Test server
hosts: target
remote_user: vagrant
become: yes
vars:
- deployable_warfile: "http://dev/artifactory/ext-snapshot-local/gameoflife-web/target/gameoflife.war"
tasks:
- name: 'verify tcp listening socket for TomCat'
wait_for:
port: 8080
timeout: 300
- name: 'verify connectivity to Artifactory'
become: no
local_action:
uri:
url: https://dev/artifactory/webapp/browserepo.html?
validate_certs: no
status_code: 200
- name: 'verify availability of deployable_warfile'
become: no
local_action:
uri:
url: "{{ deployable_warfile }}"
status_code: 200
return_content: no
timeout: 30
validate_certs: no
register: pollingstatus
until: "{{ pollingstatus.status }} == 200"
retries: 200
delay: 10
- name: "download the warfile from artifactory into apache-tomcat"
environment: proxy_env
get_url:
url: "{{ deployable_warfile }}"
force: yes
dest: /opt/apache-tomcat/webapps
owner: tomcat
group: tomcat
mode: 0644
retries: 5
delay: 10