If I run this...

- name: Create/assign database user to db and grant permissions
  mysql_user: name={{ item.env.db_user }}
              password={{ item.env.db_password }}
              priv={{ item.env.db_name | default(item.site_name) 
}}.*:ALL,GRANT
              state=present
              login_host={{ item.env.db_host | default('localhost') }}
  with_items: web_site


If item:env.db_host == 'localhost' it works.

If item:env.db_host == '%' it fails.




On Friday, May 16, 2014 9:57:59 AM UTC+12, Michael DeHaan wrote:
>
> It's a database error, so nothing with "with_nested".
>
> Key part:
>
> "You have an error in your SQL syntax; check the manual that corresponds 
> to your MariaDB server version for the right syntax to use near '.* TO 
> 'john'@'localhost'' at line 1"
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a29a6b5a-18ba-4fe9-b5a3-d763cfa13489%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to