Created
November 3, 2020 12:01
-
-
Save robinsg/5cb5a23221b4a3efca16e3fda37ff919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# install_ptfs_via_imgclg | |
- name: Get status of PTF | |
hosts: all | |
vars: | |
ptfid: 'SI72134' | |
lpp: '5733SC1' | |
src_dir: '/mnt/c/Users/robin/Downloads/IBM/IBMi' | |
dest_ifs_dir: '/tmp' | |
bin_file: 'S3355V01.BIN' | |
apply_option: '*IMMONLY' | |
gather_facts: no | |
collections: | |
- ibm.power_ibmi | |
tasks: | |
- name: Retrieve the PTF info | |
ibmi_display_fix: | |
product: "{{ lpp }}" | |
ptf: "{{ ptfid }}" | |
register: display_fix_info | |
ignore_errors: true | |
- block: | |
- name: If PTF already installed then print messages to STDOUT and end play on the host | |
debug: | |
msg: | |
- "PTF found with status: {{ display_fix_info.ptf_info[0].PTF_LOADED_STATUS }}." | |
- "Aborting upload and install of PTF" | |
- meta: end_host | |
when: display_fix_info.msg is not defined | |
- name: Copy PTF ISO/BIN file to host | |
copy: | |
src: "{{ src_dir }}/{{ bin_file }}" | |
dest: "{{ dest_ifs_dir }}" | |
force: true | |
register: file_copy_OK | |
- name: Install PTF(s) of LPP 5733SC1 from image catalog | |
ibmi_fix_imgclg: | |
product_id: | |
- "{{ lpp }}" | |
src: "{{ dest_ifs_dir }}" | |
apply_type: "{{ appy_option }}" | |
hiper_only: False | |
use_temp_path: True | |
rollback: True | |
virtual_image_name_list: | |
- "{{ bin_file }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment