-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtomcat.yml
More file actions
56 lines (51 loc) · 1.28 KB
/
tomcat.yml
File metadata and controls
56 lines (51 loc) · 1.28 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
52
53
54
55
56
- name: Play 1 - Install Tomcat
hosts: tomcat-server
become: yes
roles:
- tomcat
- name: Play 2 - Python Install
hosts: tomcat-server
become: yes
tasks:
- name: Install Python 3.6
yum:
name: python36
state: present
tags: python-install
- name: alternatives
alternatives:
name: python
link: /usr/bin/python3.6
path: /usr/bin/python3
tags: python-alternatives
- name: Play 3 - Python library install and copying of War file
hosts: tomcat-server
become: yes
vars:
ansible_python_interpreter: /usr/bin/python
tasks:
- name: Install boto3 and botocore with pip3 module
pip:
name:
- boto
- boto3
- botocore
executable: pip3.6
tags: boto-lib-install
- name: copy the war file
aws_s3:
bucket: artificatory-915am
object: trainingwale.war
dest: /etc/tomcat/webapps/trainingwale.war
mode: get
tags: copy-war
- name: Play 4 - Start Tomcat Servers
hosts: tomcat-server
become: yes
become_user: root
tasks:
#- name: shut tomcat
#command: nohup sh /etc/tomcat/bin/shutdown.sh
- name: start tomcat
command: nohup sh /etc/tomcat/bin/startup.sh
tags: start-tomcat