Collection version
latest
Environment information
quay.io/ibmmas/cli:19.4.0
What happened?
The latest Ansible run with ibm.mas_devops is failing during Manage configuration with:
The filter plugin 'ansible.builtin.length' failed: object of type 'NoneType' has no len()
This happens in suite_app_config for Manage, where is_full_manage is evaluated. The current failure suggests that mas_appws_components is being resolved as None, and the expression using | length does not handle that case safely.
When MAS_APPWS_COMPONENTS is set to an empty string, the playbook fails with the NoneType length error during Manage pre-configuration. The failure points to the when: is_full_manage condition in tasks/manage/pre-config/main.yml, and the variable logic in vars/manage.yml appears to depend on mas_appws_components not being None.
As a workaround passing it dorectly via -e works as expected
ansible-playbook mas_add_manage.yml -i inventory \
-e MAS_APPWS_COMPONENTS=""
The issue may be related to a newer Ansible behavior where is defined does not protect against None in the same way as before
Relevant log output
[ERROR]: Task failed: The filter plugin 'ansible.builtin.length' failed: object of type 'NoneType' has no len()
Task failed.
Origin: /opt/app-root/lib64/python3.12/site-packages/ansible_collections/ibm/mas_devops/roles/suite_app_config/tasks/manage/pre-config/main.yml:7:3
5
6 # Manage pre-configuration: pod templates
7 - name: "Run Manage specific pre-configuration: Pod Templates"
^ column 3
<<< caused by >>>
The filter plugin 'ansible.builtin.length' failed: object of type 'NoneType' has no len()
Origin: /opt/app-root/lib64/python3.12/site-packages/ansible_collections/ibm/mas_devops/roles/suite_app_config/tasks/manage/pre-config/main.yml:9:9
7 - name: "Run Manage specific pre-configuration: Pod Templates"
8 include_tasks: "tasks/manage/pre-config/setup-pod-templates.yml"
9 when: is_full_manage
^ column 9
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Task failed: The filter plugin 'ansible.builtin.length' failed: object of type 'NoneType' has no len()"}
Collection version
latest
Environment information
quay.io/ibmmas/cli:19.4.0What happened?
The latest Ansible run with ibm.mas_devops is failing during Manage configuration with:
The filter plugin 'ansible.builtin.length' failed: object of type 'NoneType' has no len()This happens in
suite_app_configfor Manage, whereis_full_manageis evaluated. The current failure suggests that mas_appws_components is being resolved as None, and the expression using | length does not handle that case safely.When
MAS_APPWS_COMPONENTSis set to an empty string, the playbook fails with the NoneType length error during Manage pre-configuration. The failure points to the when: is_full_manage condition intasks/manage/pre-config/main.yml,and the variable logic invars/manage.ymlappears to depend on mas_appws_components not being None.As a workaround passing it dorectly via -e works as expected
The issue may be related to a newer Ansible behavior where is defined does not protect against None in the same way as before
Relevant log output