geerlingguy / ansible-role-mysql

Ansible Role - MySQL
https://galaxy.ansible.com/geerlingguy/mysql/
MIT License
1.05k stars 861 forks source link

Mysql role failing with empty hostname error #539

Closed Manju-1195 closed 4 months ago

Manju-1195 commented 4 months ago

Hi,

I'm trying to install latest version of mysql on an ubuntu machine(Version 22.04) using geerlingguy.mysql role. However the role fails with below error

TASK [geerlingguy.mysql : Check master replication status.] *********************************************************************************************************************************************************
fatal: [] > {{ mysql_replication_master_inventory_host }}]: FAILED! => {"msg": "Empty hostname produced from delegate_to: \"{{ mysql_replication_master_inventory_host }}\""}

Below is the variable file that's defined.

mysql_databases:
  - name: "{{ database }}"
    state: present
mysql_users:
  - name: "{{ name }}"
    password: "{{ password }}"
    priv: "{{ name }}.*:ALL"
    state: present

I've not enabled replication, so not sure why the variable mysql_replication_master_inventory_host is checked. Mysql is installed successfully but the replication tasks fail.

Any input here will be really helpful. Thanks!

Manju-1195 commented 4 months ago

Please ignore :) I was using version 4.3.3 and upgrading it to the latest version 4.3.4 solved the issue. Closing the case.