Skip to content

Commit fc20e61

Browse files
committed
yml
1 parent 0085071 commit fc20e61

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

ansible/playbooks/04-java.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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

ansible/playbooks/tomcat.yml renamed to ansible/playbooks/05-tomcat.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
- hosts: web
33
become: yes
44
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
88
state: present
99
update_cache: yes
1010

@@ -20,18 +20,18 @@
2020

2121
- name: Download Tomcat
2222
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
2525

2626
- name: Extract archive
2727
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
2929
dest: /opt
3030
remote_src: yes
3131

3232
- 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
3535
path: /opt/tomcat
3636
state: link
3737

0 commit comments

Comments
 (0)