ibmi_fix_imgclg – Install fixes such as PTF, PTF Group, Technology refresh to the target IBM i system by image catalog.
Synopsis
The
ibmi_fix
module install fixes to target IBM i system by image catalog.Single PTF, PTF group and TR PTF are supported.
Parameters
- apply_type
The fix apply type of the install to perform.
required: falsetype: strdefault: *DLYALLchoices: *DLYALL, *IMMDLY, *IMMONLY- become_user
The name of the user profile that the IBM i task will run under.
Use this option to set a user with desired privileges to run the task.
required: falsetype: str- become_user_password
Use this option to set the password of the user specified in
become_user
.required: falsetype: str- fix_omit_list
The list of PTFs that will be omitted.
The key of the dict should be the product ID of the fix that is omitted.
required: Falsetype: listelements: dict- hiper_only
Whether or not only install the hiper fixes.
Specify true if only need to install hiper fixes.
required: falsetype: bool- joblog
The job log of the job executing the task will be returned even rc is zero if it is set to True.
required: falsetype: bool- product_id
The product ID of the fixes to be installed.
required: falsetype: listelements: strdefault: [’*ALL’]- rollback
Whether or not rollback if there’s failure during the installation of the fixes
required: falsetype: booldefault: True- src
The path on the target IBM i system where the fix installation file is located.
The path is an IFS directory format.
required: Truetype: str- use_temp_path
Whether or not to copy the installation file to a temp path.
If true is chosen, it will copy the installation file to a temp path.
The temp directory and the installation file copied to the temp directory will be both deleted after the task.
It is recommended to use temp path to avoid conflicts.
If false is chosen, the install will directly use the file specified in src option.
The installation file will not be deleted after install if false is chosen.
required: falsetype: booldefault: True- virtual_image_name_list
The name list of the installation file.
required: Falsetype: listelements: strdefault: [’*ALL’]
Examples
- name: Install a list of PTFs of LPP 5733SC1 from image catalog
ibm.power_ibmi.ibmi_fix_imgclg:
product_id:
- '5733SC1'
src: '{{ fix_install_path }}'
apply_type: '*DLYALL'
hiper_only: False
use_temp_path: True
rollback: True
virtual_image_name_list:
- 'S2018V01.BIN'
fix_omit_list:
- 5733SC1: "SI70819"
become_user: "QSECOFR"
become_user_password: "yourpassword"
Notes
Note
Ansible hosts file need to specify ansible_python_interpreter=/QOpenSys/pkgs/bin/python3(or python2)
See Also
Return Values
- start
The task execution start timereturned: When rc is zerotype: strsample: 2019-12-02 11:07:53.757435- end
The task execution end timereturned: When rc is zerotype: strsample: 2019-12-02 11:07:54.064969- delta
The task execution delta timereturned: When rc is zerotype: strsample: 0:00:00.307534- stdout
The task standard outputreturned: When error occurs.type: strsample: CPC2102: Library TESTLIB created- stderr
The task standard errorreturned: When error occurs.type: strsample: CPF2111:Library TESTLIB already exists- rc
The task return code (0 means success, non-zero means failure)returned: alwaystype: intsample: 255- stdout_lines
The task standard output split in linesreturned: When error occurs.type: listsample:["CRTDEVOPT DEVD(ANSIBOPT2) RSRCNAME(*VRT) ONLINE(*YES) TEXT(\u0027Created by Ansible for IBM i\u0027)", "+++ success CRTDEVOPT DEVD(ANSIBOPT2) RSRCNAME(*VRT) ONLINE(*YES) TEXT(\u0027Created by Ansible for IBM i\u0027)", "CRTIMGCLG IMGCLG(ANSIBCLG1) DIR(\u0027/home/ansiblePTFInstallTemp/\u0027) CRTDIR(*YES)"]- stderr_lines
The task standard error split in linesreturned: When error occurs.type: listsample:["CPF2111:Library TESTLIB already exists."]- job_log
The job log of the job executes the task.returned: alwaystype: listsample:[{"FROM_INSTRUCTION": "318F", "FROM_LIBRARY": "QSYS", "FROM_MODULE": "", "FROM_PROCEDURE": "", "FROM_PROGRAM": "QWTCHGJB", "FROM_USER": "CHANGLE", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPD0912", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": "Cause . . . . . : This message is used by application programs as a general escape message.", "MESSAGE_SUBTYPE": "", "MESSAGE_TEXT": "Printer device PRT01 not found.", "MESSAGE_TIMESTAMP": "2020-05-20-21.41.40.845897", "MESSAGE_TYPE": "DIAGNOSTIC", "ORDINAL_POSITION": "5", "SEVERITY": "20", "TO_INSTRUCTION": "9369", "TO_LIBRARY": "QSYS", "TO_MODULE": "QSQSRVR", "TO_PROCEDURE": "QSQSRVR", "TO_PROGRAM": "QSQSRVR"}]- need_action_ptf_list
The list contains the information of the just installed PTFs that need further IPL actions.returned: When rc is zero.type: listsample:[{"PTF_ACTION_PENDING": "NO", "PTF_ACTION_REQUIRED": "NONE", "PTF_CREATION_TIMESTAMP": "2019-12-06T01:00:43", "PTF_IDENTIFIER": "SI71746", "PTF_IPL_ACTION": "TEMPORARILY APPLIED", "PTF_IPL_REQUIRED": "IMMEDIATE", "PTF_LOADED_STATUS": "LOADED", "PTF_PRODUCT_ID": "5733SC1", "PTF_SAVE_FILE": "NO", "PTF_STATUS_TIMESTAMP": "2020-03-24T09:03:55", "PTF_TEMPORARY_APPLY_TIMESTAMP": null}]