-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-playbook.yml
45 lines (36 loc) · 1.04 KB
/
deploy-playbook.yml
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
---
- hosts: tomcat
serial: 1
become: yes
become_method: sudo
# vars:
# package_name: devopsarea-1.0.war
tasks:
- name: Install Java
apt: name=default-jdk state=present
- name: Install Tomcat
apt: name=tomcat8 state=present
- name: Install Tomcat admin
apt: name=tomcat8-admin state=present
- name: Configure Tomcat users
copy:
src: tomcat-users.xml
dest: /etc/tomcat8/
owner: root
group: tomcat8
mode: 0640
- name: Stop the firewall
service:
name: ufw
state: stopped
# - name: restart tomcat
# service:
# name: tomcat8
# state: restarted
# - name: wait for tomcat to start
# wait_for: port=8080
- name: deploy the generated package to tomcat
copy:
src: ./target/devopsarea-1.0.war
dest: /var/lib/tomcat8/webapps/
mode: 0777