-
Notifications
You must be signed in to change notification settings - Fork 1.9k
mysql_user should flush privileges when changed #2357
Comments
I think we should be able to add a command to flush privs at the end of the module, when change == true. Will take a stab at that tomorrow. |
@lordnynex Using the latest version of the module, I am not generating your results.
In my case on centos6, the changes did not require a flush. Are you still seeing this on latest devel? and if so, on what version of mysql and os? |
This issue came up when I was helping someone on IRC so I have limited insight into the behavior of the current stable release. After I helped the user isolate the issue, @bcoca advised me to file this issue. IIRC this was ~1.9.2 stable at the time. Your reproduction steps do indicate this bug may be invalid now. It is possible that the issue has been fixed in the latest dev branch. The reproduction steps I provided where not necessarily accurate because the user had the 'mysql_user' tasks followed directly by some task that used those credentials. Is it possible the module does flush privileges but somehow defers it until after the playbook finishes? Maybe something like - mysql_user: name=root password=root priv=*.*:ALL state=present check_implicit_admin=yes
- shell: mysql -u root -p root -e "select(1);" |
Works for me, but I say we leave this open, maybe someone else can reproduce this. |
@Jmainguy, ping. This issue is still waiting on your response. |
Looks like nobody else was able to reproduce. Ok to close out? |
needs_contributor |
This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo. |
This issue was migrated to ansible/ansible#30022 |
Issue Type:
Bug Report
Ansible Version:
Any version using mysql_user
Ansible Configuration:
N/A
Environment:
N/A
Summary:
mysql_user should flush privileges when changed. Currently requires extra task to reload mysql or manually flush privileges.
Steps To Reproduce:
Expected Results:
Changed credentials should be usable in subsequent tasks without a mysql reload. Ex
Actual Results:
Tasks/commands attempting to use the modified credentials will fail execution.
The text was updated successfully, but these errors were encountered: