# mysql\_user doesen't translate variables

**URL:** <https://forum.ansible.com/t/mysql-user-doesent-translate-variables/21294>\
**Category:** Ansible Project\
**Created:** [April 28, 2016, 8:15am UTC](https://forum.ansible.com/t/mysql-user-doesent-translate-variables/21294 "2016-04-28T08:15:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florian\_Luttgens](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@Florian\_Luttgens](https://forum.ansible.com/u/Florian_Luttgens)\
**Post date:** [April 28, 2016, 8:15am UTC](https://forum.ansible.com/t/mysql-user-doesent-translate-variables/21294/1 "2016-04-28T08:15:38Z")

</div>

Hi,  
im trying to add a mysql user, but it seems the mysql\_user module does not translate the variables. It works on mysql\_db tho.

Output:

`  
\<178.250._ **.** _\> REMOTE\_MODULE mysql\_user name={{ item.value.projekt | lower }}_{{ item.key }}_{{ stage }} password=VALUE\_HIDDEN item.value.password }} host=localhost login\_host={{ ansible.fqdn }} priv=_._:ALL state=present  
[…]  
msg: this module requires key=value arguments ([‘name={#’, ‘item.value.projekt’, ‘|’, ‘lower’, ‘#}_{#', ‘item.key’, '#}_{#’, ‘stage’, ‘#}’, ‘password={#’, ‘item.value.password’, ‘#}’, ‘host=localhost’, ‘login\_host={#’, ‘ansible.fqdn’, ‘#}’, ‘priv=_._:ALL’, ‘state=present’])

`

Task:

`

- name: Create MySQL Database User  
mysql\_user: name={{ item.value.projekt | lower }}_{{ item.key }}_{{ stage }} password={{ item.value.password }} host=localhost login\_host={{ ansible.fqdn }} priv=_._:ALL state=present  
with\_dict: “{{webpaket}}”

`

Any guess?

Regards  
Florian Luettgens

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [May 3, 2016, 4:57am UTC](https://forum.ansible.com/t/mysql-user-doesent-translate-variables/21294/2 "2016-05-03T04:57:19Z")

</div>

> &nbsp;&nbsp;&nbsp;&nbsp;- name: Create MySQL Database User  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql\_user: name={{ item.value.projekt | lower }}\_{{ item.key }}\_{{  
> stage }} password={{ item.value.password }} host=localhost login\_host={{  
> ansible.fqdn }} priv=\*.\*:ALL state=present  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with\_dict: "{{webpaket}}"

Don't you need to quote all the variables?

... name: "{{ item.value.projekt | lower }}\_{{ item.key }}\_{{

> stage }}" ...

Johannes
