mysql_user errors when using with_items

18 views
Skip to first unread message

Jeff Sault

unread,
Jul 11, 2016, 11:33:55 AM7/11/16
to Ansible Project
Hi All,

Does anyone know why the below ansible code is failing?

 - name: Add permissions to heeservers to connect to SQL
   mysql_user: name={{ mu_db_user }} password={{ mu_db_pass }} host="{{ item }}"  priv={{ mu_db_name }}.*:ALL state=present
   with_items: '{{groups.heeservers}}'

The error reported is..

failed: [mu.vagrant] (item=hee.vagrant) => {"failed": true, "item": "hee.vagrant", "msg": "(1396, \"Operation CREATE USER failed for 'root'@'hee.vagrant'\")"}

If I change the host from "{{ item }}" to a fixed string it works as expected but I dont understand why.

Thanks!
Jeff

Jeff Sault

unread,
Jul 18, 2016, 4:35:12 AM7/18/16
to Ansible Project
Anyone?
Reply all
Reply to author
Forward
0 new messages