You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #22, if local_action is used with a mysql install ansible_hostname is localhost and not the hostname of the machine and the root password is not set.
Suggestion would be to grab the results of:
command: 'mysql -NBe 'SELECT Host from mysql.user WHERE User = "root" order by (Host="localhost") ASC'
Note that this orders the localhost last so that ansible doesn't lock itself out.
The text was updated successfully, but these errors were encountered:
Nice. Silly me, trying to manipulate the result set with Python/Jinja2... when just adding the order statement to the MySQL statement would work perfectly.
This should be simple enough to do—thanks for reporting, and I'll try to get to this soon!
solomongifford
pushed a commit
to solomongifford/ansible-role-mysql-1
that referenced
this issue
Apr 9, 2015
Related to #22, if local_action is used with a mysql install ansible_hostname is localhost and not the hostname of the machine and the root password is not set.
Suggestion would be to grab the results of:
command: 'mysql -NBe 'SELECT Host from mysql.user WHERE User = "root" order by (Host="localhost") ASC'
Note that this orders the localhost last so that ansible doesn't lock itself out.
The text was updated successfully, but these errors were encountered: