ansible-for-i
ansible-for-i copied to clipboard
check_download_ptf_group.yml
Hello all, I am testing the playbook check_download_ptf_group.ym with the PTF group SF99738 with no error. Now I want to do the same with another group like SF99704 or SF99668 but I receive an error : TASK [ibm.power_ibmi.fix_repo_download_add_ptf_group : Download PTF group] ********************************************************************************************************************************************************** task path: /home/team0/.ansible/collections/ansible_collections/ibm/power_ibmi/roles/fix_repo_download_add_ptf_group/tasks/main.yml:4 fatal: [10.3.60.128]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ptf_group_info' is undefined\n\nThe error appears to be in '/home/team0/.ansible/collections/ansible_collections/ibm/power_ibmi/roles/fix_repo_download_add_ptf_group/tasks/main.yml': line 4, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# Call ibm.power_ibmi.ibmi_download_fix module to download ptf group, then call ibm.power_ibmi.ibmi_fix_repo module to add information into download_status table in catalog.\n- name: Download PTF group\n ^ here\n" } I cannot download another group. Thanks for you help Ludo result_ptf_download.txt
@pengzengyufish , could you please take a look at this issue?
Hello all, I tested another think with the same playbook. I deleted the PTFs ISO on /qibm/userdata/os/ecs/ptfs and also the re.sqlite3 from /etc/ibmi_ansilble_fix_management on repo partition. I executed the same playbook check_download_ptf_group.yml and I have the same error. In the verbose result, I saw a find on sqlite3 database but not an add. Thanks for your help Ludo
Hi ludomenard,
Sorry for the late update.
It's weird. The error happens when trying to download the ptf group.
- Make sure you have updated to the latest fix management code
- Please add below debug in check_download_ptf_group.yml, and see if fix_group_check_result.group_info[0] is valid:
- block:
- name: End play when no ptf group need to be downloaded
debug:
msg: "PTF group information is already in catalog or is already downloading, quit play"
- name: end_host
meta: end_host
when: ptf_group_find_result.fail_list is not defined or download_status_find_result.fail_list is not defined
- name: debug fix_group_check_result.group_info[0]
debug:
var: fix_group_check_result.group_info[0]
- name: Include fix_repo_download_add_ptf_group role to download the ptf group and add information into catalog download_status table
include_role:
name: fix_repo_download_add_ptf_group
vars:
ptf_group_info: "{{ fix_group_check_result.group_info[0] }}"