forked from praveenjirra/DevOps-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.yml
More file actions
51 lines (40 loc) · 1.54 KB
/
test.yml
File metadata and controls
51 lines (40 loc) · 1.54 KB
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
49
50
51
---
- hosts: all
remote_user: root
sudo: yes
tasks:
- name: Install add-apt-repostory
become: yes
apt: name=software-properties-common state=latest
- name: Add Oracle Java Repository
become: yes
apt_repository: repo='ppa:webupd8team/java'
- 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 Oracle Java 8
become: yes
apt: name={{item}} state=latest
with_items:
- oracle-java8-installer
- ca-certificates
- oracle-java8-set-default
- name: Create Folder
file:
path: /opt/tomcat
state: directory
mode: 0755
- name: Download Tomcat
get_url: url=https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.27/bin/apache-tomcat-8.0.27.tar.gz dest=/opt/tomcat/jirra
- name: Extract archive
unarchive: src=/opt/tomcat/apache-tomcat-8.0.27.tar.gz dest=/opt/tomcat remote_src=yes
- name: Download Application
get_url: url=https://s3-us-west-1.amazonaws.com/vivekapps/LoginApp.war dest=/opt/
- name: start apache-tomcat-8.0.27
command: "nohup /opt/tomcat/apache-tomcat-8.0.27/bin/startup.sh"
- name: copy LoginApp.war
shell: cp /opt/LoginApp.war /opt/tomcat/apache-tomcat-8.0.27/webapps/
- name: stop apache-tomcat-8.0.27
command: "nohup /opt/tomcat/apache-tomcat-8.0.27/bin/shutdown.sh"
- name: start apache-tomcat-8.0.27
command: "nohup /opt/tomcat/apache-tomcat-8.0.27/bin/startup.sh"