File tree Expand file tree Collapse file tree 5 files changed +25
-8
lines changed Expand file tree Collapse file tree 5 files changed +25
-8
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ - name : install java
2
+ hosts : all
3
+ become : yes
4
+ tasks :
5
+ - name : run apt-get update
6
+ apt :
7
+ update_cache : yes
8
+ - name : install java
9
+ apt :
10
+ name : openjdk-11-jdk
11
+ state : present
12
+ - name : capture java version
13
+ shell : java -version
14
+ register : jversion
15
+ - name : print java version
16
+ debug :
17
+ var : jversion
Original file line number Diff line number Diff line change 2
2
- hosts : web
3
3
become : yes
4
4
tasks :
5
- - name : Install Java 1.8
6
- apt : # # apt-get install openjdk-8 -jdk -y
7
- name : openjdk-8 -jdk
5
+ - name : Install Java 1.11
6
+ apt : # # apt-get install openjdk-11 -jdk -y
7
+ name : openjdk-11 -jdk
8
8
state : present
9
9
update_cache : yes
10
10
20
20
21
21
- name : Download Tomcat
22
22
get_url : # ## wget url -O /tmp/tomca.tgz
23
- url : https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.40 /bin/apache-tomcat-8.5.40 .tar.gz
24
- dest : /tmp/apache-tomcat-8.5.40 .tar.gz
23
+ url : https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.72 /bin/apache-tomcat-9.0.72 .tar.gz
24
+ dest : /tmp/apache-tomcat-9.0.72 .tar.gz
25
25
26
26
- name : Extract archive
27
27
unarchive : # # tar -xzf tarfile ## by default source is always controller
28
- src : /tmp/apache-tomcat-8.5.40 .tar.gz
28
+ src : /tmp/apache-tomcat-9.0.72 .tar.gz
29
29
dest : /opt
30
30
remote_src : yes
31
31
32
32
- name : create symlink
33
- file : # # ln -s /opt/tomcat /opt/apache-tomcat-8.5.40
34
- src : /opt/apache-tomcat-8.5.40
33
+ file : # # ln -s /opt/tomcat /opt/apache-tomcat-9.0.72
34
+ src : /opt/apache-tomcat-9.0.72
35
35
path : /opt/tomcat
36
36
state : link
37
37
You can’t perform that action at this time.
0 commit comments