-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jetty_install.yml
67 lines (49 loc) · 1.84 KB
/
Jetty_install.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
# Description:
# This playbook shows how to install a Jetty server using Ansible
# ibm.power_ibmi (ansible for i)
# Parameters:
# target_ibmi : replace by an ibmi host defined in the ansible inventory
# tmpdir : temp folder which the installation files are copied
# targetdir : target directory folder on IBM i
# jetty: name of jetty library
# note that some values are hardcoded like user to use for Jetty ARCAD_PGMR, the library created on IBM i JETTY,
# the non secured port 8080 and the secured port 8443
# Example:
# ansible-playbook -i hosts Jetty_install.yml -e "target_ibmi=your_ibmi"
- hosts: '{{ target_ibmi }}'
gather_facts: no
collections:
- ibm.power_ibmi
vars:
destpath: "/tmp/Setup_Builder-Webconsole-13.2.0_IBMi.jar"
tmpdir: "/tmp/"
targetdir: "/opt/jetty"
jetty: "JETTY"
tasks:
- name: Copy file from Ansible Master to target IBM i on the tmp folder
copy:
src: "{{destpath}}"
dest: "{{destpath}}"
- name: Creating the input properties file
shell: "echo \"{{targetdir}}\nARCAD_PGMR\nJETTY\n8080\n8443\n\" > {{tmpdir}}jetty.properties"
- name: installation
shell: "tr -d '\\015' < {{tmpdir}}jetty.properties | java -jar {{destpath}}"
- name: change command STRJTYSVR to put JETTY as product library
ibmi_cl_command:
cmd: CHGCMD {{jetty}}/STRJTYSVR PRDLIB({{jetty}})
joblog: true
ignore_errors: yes
- name: change command ENDJTYSVR to put JETTY as product library
ibmi_cl_command:
cmd: CHGCMD {{jetty}}/ENDJTYSVR PRDLIB({{jetty}})
joblog: true
ignore_errors: yes
- name: stop Jetty subsystem
ibmi_cl_command:
cmd: ENDSBS SBSD({{jetty}}) OPTION(*IMMED)
ignore_errors: yes
- name: start Jetty subsystem
ibmi_cl_command:
cmd: STRSBS SBSD({{jetty}}/{{jetty}})
ignore_errors: yes