Issues with mysql_db module

Something changed with the mysql_db module recently and it has broken all of our MySQL backup playbooks. We get the following error now:

unable to find ‘/home/user/.my.cnf’ . Exception message: ‘password’ is an invalid keyword argument for this function

According to the documentation, the default for config_file is “~/.my.cnf” for the user and password. But if we make that an empty string, it should be ignored. However, when I try that, I get the same error message, only without the path to the .my.cnf file:

unable to find . Exception message: ‘password’ is an invalid keyword argument for this function

We are specifying our username and password via Ansible Vault:

  • name: Backup MySQL databases
    community.mysql.mysql_db:
    state: dump
    name: “redmine”
    target: “/tmp/backup_{{ inventory_hostname }}.{{ ansible_date_time.month }}{{ ansible_date_time.day }}{{ ansible_date_time.year }}.sql”
    config_file: ‘’
    login_user: root
    login_password: “{{ mysql_password }}”

How can I determine why I’m getting the “password is an invalid keyword argument for this function”, and how can I fix it?

Thanks,
Harry