-
Notifications
You must be signed in to change notification settings - Fork 0
/
ARCAD_fix_install.yml
65 lines (50 loc) · 1.83 KB
/
ARCAD_fix_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
---
# Description:
# This playbook shows how to install an ARCAD fix/patch using Ansible and ibm collection
# ibm.power_ibmi (ansible for i)
# Restriction:
# You must have *ALLOBJ special authorities to use this playbook (see inventory to define the profile to use
# that should be configured with ssh
# Parameters:
# fixpath : not required /tmp assumed by default ansible server path containing the fix FMxxxxxx.dta file
# fix : not required the fix FM210260 will be installed
# ext : not required assuming the extension is .DTA
# Example:
# ansible-playbook -i hosts ARCAD_Master_install.yml -e "target_ibmi=your_ibmi"
- hosts: '{{ target_ibmi }}'
gather_facts: no
collections:
- ibm.power_ibmi
vars:
fixpath: "/tmp/"
fix: "FM210260"
ext: ".DTA"
tasks:
- name: copy fix to the target
copy:
src: "{{ fixpath }}{{ fix }}{{ ext}}"
dest: "{{ fixpath}}{{ fix }}{{ ext }}"
- name: create savf into QGPL
ibmi_cl_command:
cmd: CRTSAVF QGPL/{{ fix }}
ignore_errors: yes
- name: delete fix library if exists
ibmi_cl_command:
cmd: DLTLIB {{fix}}
ignore_errors: yes
- name: copy into a savefile
ibmi_cl_command:
cmd: cpyfrmstmf FROMSTMF('{{fixpath}}{{ fix }}{{ ext }}') TOMBR('/QSYS.LIB/QGPL.LIB/{{ fix }}.file') MBROPT(*REPLACE)
joblog: true
- name: restore fix library
ibmi_cl_command:
cmd: RSTLIB SAVLIB({{ fix }}) DEV(*SAVF) SAVF(QGPL/{{ fix }}) MBROPT(*ALL) STRJRN(*NO) ALWOBJDIF(*ALL)
joblog: true
- name: regenerate macro-command RCVFIX
ibmi_cl_command:
cmd: AGENMACCMD MACRO({{ fix }}/RCVFIX)
joblog: true
- name: install fix
ibmi_cl_command:
cmd: "{{ fix }}/RCVFIX LIB({{ fix }})"
joblog: true