Ansible runs fail when an ansible vault encrypted variable is used

Problem:
We are using vault encrypted variables to store passwords in our ansible files. We added the vault file to /etc/ansible/ansible.cfg and /usr/share/foreman-proxy/.ansible.cfg as we were not sure which one is used under which circumstances in foreman. However, since then, runs fail with an error message in the callback:

[WARNING]: Failure using method (v2_playbook_on_stats) in callback plugin (<ansible_collections.theforeman.foreman.plugins.callback.foreman.CallbackModule object at 0x7f0d4cfd6410>): uā€™*******ā€™ is not JSON serializable

The ***** is the secret, which is unfortunately dumped in cleartext to the output message.

Expected outcome:
Runs should work with ansible vault encrypted variables.

Foreman and Proxy versions:
Foreman & Proxy 3.0.1
Katello 4.2.1

Foreman and Proxy plugin versions:
tfm-rubygem-foreman_ansible-6.4.1-1.fm2_6.el7.noarch
tfm-rubygem-foreman_ansible_core-4.2.1-1.fm2_5.el7.noarch

Distribution and version:
CentOS Linux release 7.9.2009

Other relevant data: