-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
41 lines (41 loc) · 1.21 KB
/
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
---
- hosts: webservers
user: root
tasks:
- name: Install Java 8
apt:
name: openjdk-8-jre
state: present
- name: Create Folder
file:
path: /home/osboxes/tomcat
state: directory
mode: 0755
owner: osboxes
group: osboxes
- name: Download Tomcat
get_url:
url: https://www-eu.apache.org/dist/tomcat/tomcat-9/v9.0.22/bin/apache-tomcat-9.0.22.tar.gz
dest: /home/osboxes/tomcat
- name: Extract tomcat
unarchive:
src: /home/osboxes/tomcat/apache-tomcat-9.0.22.tar.gz
dest: /home/osboxes/tomcat
remote_src: yes
- name: Create Folder to copy
file:
path: /home/osboxes/apache-tomcat-9.0.22/webapps/coches
state: directory
mode: 0755
owner: osboxes
group: osboxes
- name: Copy Artefact
copy:
src: /root/.jenkins/workspace/Pipelinecoches/dist/webForm/
dest: /home/osboxes/apache-tomcat-9.0.22/webapps/
- name: Tomcat configuration
copy:
src: /root/.jenkins/workspace/Pipelinecoches/server.xml
dest: /home/osboxes/tomcat/apache-tomcat-9.0.22/conf/server.xml
- name: Start Apache tomcat
shell: /home/osboxes/tomcat/apache-tomcat-9.0.22/bin/startup.sh