From 3c8af7b1df6c9ffe8260d083c163a998f98d2067 Mon Sep 17 00:00:00 2001 From: satya <38804803+satyamuralidhar@users.noreply.github.com> Date: Sun, 19 Jul 2020 10:48:20 +0530 Subject: [PATCH] Create tomcat.yml --- tomcat-sample/tomcat.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tomcat-sample/tomcat.yml diff --git a/tomcat-sample/tomcat.yml b/tomcat-sample/tomcat.yml new file mode 100644 index 000000000..f39462206 --- /dev/null +++ b/tomcat-sample/tomcat.yml @@ -0,0 +1,44 @@ +--- +- hosts: all + become: yes + tasks: + - name: adding default jre + apt: + name: default-jre + update_cache: yes + state: present + - name: adding default jdk + apt: + name: default-jdk + update_cache: yes + state: present + + - name: adding properties + apt: + name: software-properties-common + update_cache: yes + - name: adding repository + apt_repository: + repo: 'ppa:webupd8team/java' + state: present + update_cache: yes + - name: Accept Java 8 License + become: yes + debconf: name='oracle-java8-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select' + - name: install java8 + apt: + name: "{{item}}" + update_cache: yes + with_items: + - oracle-java8-installer + - ca-certificates + - oracle-java8-set-default + - name: install tomcat8 + apt: + name: tomcat8 + update_cache: yes + state: present + - name: service start + service: + name: tomcat8 + state: restarted