IBM / ansible-for-i

the tool is to provide several customized modules for Ansible to manage IBM i systems.
GNU General Public License v3.0
54 stars 52 forks source link

fix_repo_download_apply_individual_ptfs error line 8 'sequence_var|int == 1' failed #167

Closed Pierroto69 closed 8 months ago

Pierroto69 commented 8 months ago

Hi I execute the role "fix_repo_download_apply_individual_ptfs" in a playbook but I have an error in line 8 'sequence_var|int == 1' failed

"msg": "The conditional check 'sequence_var|int == 1' failed. The error was: error while evaluating conditional (sequence_var|int == 1): 'sequence_var' is undefined\n\nThe error appears to be in '/runner/requirements_collections/ansible_collections/ibm/power_ibmi/roles/fix_repo_download_apply_individual_ptfs/tasks/main.yml': line 8, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: compose all_ptfs_list and original_ptfs_list\n ^ here\n"

Do you know why ?

And other point in documentation of the role "fix_repo_download_apply_individual_ptfs" in galaxy the Example Playbook refer to another role "download_individual_ptfs" see below , do you know why this difference ?

thanks for your help

https://galaxy.ansible.com/ui/repo/published/ibm/power_ibmi/content/role/fix_repo_download_apply_individual_ptfs/

Example Playbook

robgjertsen1 commented 8 months ago

The playbook example in the README for the role fix_repo_download_apply_individual_ptfs certainly looks like it is a cut and paste from the other role "download_individual_ptfs" and wasn't properly modified for this role, so that needs to be cleaned up.

The role appears to be assuming "sequence_var" is defined as a role variable although that is not listed in the README for role variables. The role is used in an example in usecases/fix_management/download_apply_individual_ptfs.yml which defines this "sequence_var" for a loop calling the role. For now you can customize this use case playbook or set "sequence_var" to 1 in your playbook vars section. I need to investigate this further.

Pierroto69 commented 8 months ago

Hi Rob, many thanks it's works fine now when I add the following line in the playbook vars => sequence_var: 1