forked from codecowboydotio/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tomcat.yml
37 lines (37 loc) · 951 Bytes
/
tomcat.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
- hosts: "{{ target_hosts | default('eap-hosts') }}"
vars:
- new_dir: /foo
become: yes
become_user: root
tasks:
- name: Install git
package:
name: git
state: present
- name: Install java jdk
package:
name: java-1.8.0-openjdk-devel
state: present
- name: Install tomcat
package:
name: tomcat
state: present
- name: pull hello world from git
git:
repo: git://github.com/svkdotcloud/helloworld-java
dest: "{{ new_dir }}"
clone: yes
- name: compile war file
shell: ./build.sh chdir={{ new_dir }}
- name: Copy file to deployment directory
shell: cp /helloworld.war /usr/share/tomcat/webapps
- name: Turn off firewalld
systemd:
name: firewalld
state: stopped
- name: Start Tomcat
systemd:
name: tomcat
state: started
# - name: foo
# shell: echo foo