forked from jvsocial/MavenBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml
More file actions
30 lines (26 loc) · 669 Bytes
/
deploy.yml
File metadata and controls
30 lines (26 loc) · 669 Bytes
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
---
- hosts: linux-servers
tasks:
- name: Update repositories cache and install "foo" package
apt:
update_cache: yes
- name: Ansible apt install Java
apt:
name: default-jdk
state: present
- name: Tomcat Package Installation
apt:
name: "{{ item }}"
state: present
loop:
- "tomcat10"
- "tomcat10-admin"
- name: Restart Tomcat Service
service: name=tomcat10 state=restarted
- name: Deploy War on Tomcat Server
copy:
src: target/java-example.war
dest: /var/lib/tomcat10/webapps/
owner: tomcat
group: tomcat
mode: '0755'