# Geerlingguy.mysql failing with empty value

**URL:** <https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553>\
**Category:** Get Help\
**Tags:** mysql, role, playbook, ubuntu, galaxy-ng\
**Created:** [May 7, 2024, 10:32am UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553 "2024-05-07T10:32:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manju](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Manju](https://forum.ansible.com/u/Manju)\
**Post date:** [May 7, 2024, 10:32am UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/1 "2024-05-07T10:32:51Z")

</div>

Hi

I’m trying to install latest version of mysql using geerlingguy.mysql role on an ubuntu vm(Version 22.04). Would like to install the mysql-server package instead of MariaDB package.  
The role fails with error below

```auto
Empty hostname produced from delegate_to: {{ mysql_replication_master_inventory_host }}

```

This is my variables file

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

```

I’ve not defined replication, so not sure why its checking the replication master  
Can someone help in pointing out if I’m doing something wrong/missing here

Thanks in advance!

#playbook #role #mysql #galaxy

---

<div class="post-metadata">

**Author:** ![jpmens](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jpmens/32/5543_2.png) [@jpmens](https://forum.ansible.com/u/jpmens)\
**Post date:** [May 7, 2024, 11:55am UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/2 "2024-05-07T11:55:58Z")

</div>

Your question is likely better suited to be asked in Jeff’s role repository.

---

<div class="post-metadata">

**Author:** ![Manju](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Manju](https://forum.ansible.com/u/Manju)\
**Post date:** [May 7, 2024, 1:16pm UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/3 "2024-05-07T13:16:38Z")

</div>

Thanks a lot for the response. I’ve posted an issue in geerlingguy repository.  
(And I think the issue is related to ansible core 2.16. I get it working using awx)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [May 7, 2024, 3:58pm UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/4 "2024-05-07T15:58:01Z")

</div>

BTW, if you include the link to the issue/discussion/… in the role repository, others who find this discussion first can quickly navigate to the other discussion 🙂

---

<div class="post-metadata">

**Author:** ![flowerysong](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/flowerysong/32/2305_2.png) [@flowerysong](https://forum.ansible.com/u/flowerysong)\
**Post date:** [May 7, 2024, 6:52pm UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/5 "2024-05-07T18:52:49Z")

</div>

Are you sure you’re using the latest version of the role? This error should have been fixed by [Workaround for https://github.com/ansible/ansible/issues/82264 · geerlingguy/ansible-role-mysql@b04a0ca · GitHub](https://github.com/geerlingguy/ansible-role-mysql/commit/b04a0ca23105e9b410f61a051477e0414be4928a), which is included in the 4.3.4 release.

---

<div class="post-metadata">

**Author:** ![Manju](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Manju](https://forum.ansible.com/u/Manju)\
**Post date:** [May 8, 2024, 7:05am UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/6 "2024-05-08T07:05:32Z")

</div>

Sure, Below is the link of the issue posted.  
[https://github.com/geerlingguy/ansible-role-mysql/issues/539](https://github.com/geerlingguy/ansible-role-mysql/issues/539)

---

<div class="post-metadata">

**Author:** ![Manju](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Manju](https://forum.ansible.com/u/Manju)\
**Post date:** [May 8, 2024, 7:19am UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/7 "2024-05-08T07:19:58Z")

</div>

Aah sorry my bad  
And yes it worked 🙂 . I was using the 4.3.3 version locally and thus faced this issue. But in awx, I was specifying the version 4.3.4 in the requirements.yml file and thus it worked there.  
Thanks a lot for all your help and inputs 👍

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [June 7, 2024, 7:20am UTC](https://forum.ansible.com/t/geerlingguy-mysql-failing-with-empty-value/5553/8 "2024-06-07T07:20:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
