On 04/01/17 05:48, Mona Gopal wrote:
Hello,

I have the below task

mysql_user: login_user={{ db_user_root }} login_password={{ db_pass_root
}} name={{ db_user }} password={{ db_pass }} priv=*.*:ALL,GRANT
state=present


We're facing issue on running this, from machine B to install on machine
A. Installing from machine A to machine B is running fine.


However, by specifying login_host parameter this works fine.

But, the same parameter is not essential while running from A to B.

What could be the scenario?? why is that login_host parameter is
required when running from B to A and not vice versa.

I would be guessing, because you do not give enough information.
I presume that your server my.cnf bind only to an IP on machine A, while machine B has a UNIX socket connection, the default MySQL python module uses a UNIX socket connection, while you can override that by using the 'login_host' variable and then the module will use a TCP socket Another possibility is that your user running the Ansible task has a .my.cnf in $HOME which overrides the default host value, so you need to specify the correct one manually

However this is a wild guess, for a better answer, more information is required.




Thanks in advance,

Mona G
Regards,
Tosh.





--
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/dec5457c-72e9-f184-13c0-64fae232f19e%40vantosh.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to