Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root password for hostname for local_action #23

Closed
solomongifford opened this issue Apr 9, 2015 · 2 comments
Closed

Root password for hostname for local_action #23

solomongifford opened this issue Apr 9, 2015 · 2 comments

Comments

@solomongifford
Copy link
Contributor

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.

@geerlingguy
Copy link
Owner

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!

@geerlingguy
Copy link
Owner

Fixed in PR #28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants