mysql_user module error "failed to parse"

This task:

  • name: test1
    mysql_user: name={{ item.name }} password={{ item.password }} host={{ item.host }} priv={{ item.priv }} state=present login_user=root login_password=rtAtJ8NaWvRX6EJsLPiixm
    with_items:
  • { name: ‘hibbert_admin’, password: ‘Fi4iKbwuoNyfK3KsNMThDn’, host: ‘10.209.104.19’, priv: ‘.:ALL’ }

Is resulting in the following error:

TASK: [hibbert_db | test1] ****************************************************
fatal: [q-mysql01] => failed to parse:
SUDO-SUCCESS-msjntpckybyqqlzjnhyleigbtnhouzjy
Traceback (most recent call last):
File “/tmp/ansible-tmp-1395766982.93-90997544941085/mysql_user”, line 1539, in
main()
File “/tmp/ansible-tmp-1395766982.93-90997544941085/mysql_user”, line 459, in main
changed = user_add(cursor, user, host, password, priv)
File “/tmp/ansible-tmp-1395766982.93-90997544941085/mysql_user”, line 158, in user_add
cursor.execute(“CREATE USER %s@%s IDENTIFIED BY %s”, (user,host,password))
File “/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py”, line 173, in execute
self.errorhandler(self, exc, value)
File “/usr/lib64/python2.6/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1396, “Operation CREATE USER failed for ‘hibbert_admin’@‘10.209.104.19’”)

FATAL: all hosts have already failed – aborting

Any ideas why this wouldn’t work? login_user and login_password are correct.

Its always successful the first time but on subsequent runs if the user has been manually modified then it throws this error.

If the user is deleted manually ansible cannot create the user if the mysql_user: contains a host=

If the mysql_user does not contain a host= field then the user is created on subsequent plays.

Could this be a bug in ansible?