cp-ansible
cp-ansible copied to clipboard
Collection confluent.platform 7.6.1 filters.py file differs from the GitHub version
File filters.py
used for definition of custom filters is different in collection .tar
file from the version available via git. This causes issues when running playbook. Namely construction of kafka_broker_final_properties
or any task where confluent.platform.listener_properties()
filter is called stops with error, due to different number of input variables.
The error when running specific tasks with this filter being used (only part of the output):
TASK [kafka_broker : Assert log.dirs Property not Misconfigured] **************************************************************************************************************************************************************************************************************
Thursday 04 July 2024 14:54:16 +0200 (0:00:00.092) 0:00:26.895 *********
fatal: [kf01.edc.ttc-noviq.cz]: FAILED! => {"msg": "The conditional check 'kafka_broker_final_properties['log.dirs'].split(',')[0] != \"/\"' failed. The error was: An unhandled exception occurred while templating '{{ kafka_broker_combined_properties | combine(kafka_broker_custom_properties) }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating
...
...
... FilterModule.listener_properties() takes 20 positional arguments but 27 were given. FilterModule.listener_properties() takes 20 positional arguments but 27 were given"}
To Reproduce
- install confluent.platform from ansible galaxy
- clone git repository of confluent playbook
- run configuration with basic playbook
Expected behaviour No errors should occur.
Logs See above
Environment (please complete the following information):
- OS:
Debian 12.6.
- Ansible Version:
ansible [core 2.14.3]
FIX:
Just replace the filters.py from plugins/filter/filters.py in the collection firectory. In my case
cp plugins/filter/filters.py /home/ansible-user/.ansible/collections/ansible_collections/confluent/platform/plugins/filter/filters.py
Additional context I have not performed the whole instalation, just took over after my colleague, when things went in the wrong direction. So maybe there where some extra steps in the install procedure done. From what I tell, this specific file is definitely differrent and copying the GIT version into collection dir fixes the situation.
Thank you for the investigation r.