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

mysql_user module check_implicit_admin doesn't fallback to login credentials #64560

Closed
ricco24 opened this issue Nov 7, 2019 · 5 comments
Closed
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. database Database category has_pr This issue has an associated PR. module This issue/PR relates to a module. mysql support:community This issue/PR relates to code supported by the Ansible community.

Comments

@ricco24
Copy link

ricco24 commented Nov 7, 2019

SUMMARY

mysql_user module with check_implicit_admin=yes try to connect to database without password. But when login failed doesn't fallback to login_user and login_password credentials.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

mysql_user

ANSIBLE VERSION
2.9.0
OS / ENVIRONMENT

Ubuntu 18.04

STEPS TO REPRODUCE
- name: Update root password for all root accounts
  mysql_user: name=root password={{ mysql_root_password }} login_user=root login_password={{ mysql_root_password }} host={{ item }} check_implicit_admin=yes
  with_items:
    - "{{ current_hostname.stdout | lower }}"
    - 127.0.0.1
    - ::1
    - localhost

First run is ok, but on second run Ansible failed when try to connect as root without password and no fallback to login credentials.

EXPECTED RESULTS

First run -> root / no password
Other runs -> root / mysql_root_password

ACTUAL RESULTS

Provision failed at other as first run

@ansibot
Copy link
Contributor

ansibot commented Nov 7, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. database Database category module This issue/PR relates to a module. mysql needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Nov 7, 2019
juergenhoetzel added a commit to juergenhoetzel/ansible that referenced this issue Nov 8, 2019
mysql_user expects an Exception when using check_implicit_admin.
@juergenhoetzel
Copy link
Contributor

@misterunknown
Copy link

I have the same problem.

@nerijus
Copy link
Contributor

nerijus commented Dec 5, 2019

I have the same problem, #64585 helps.

juergenhoetzel added a commit to juergenhoetzel/ansible that referenced this issue Dec 5, 2019
mysql_user expects an Exception when using check_implicit_admin.
juergenhoetzel added a commit to juergenhoetzel/ansible that referenced this issue Dec 5, 2019
juergenhoetzel added a commit to juergenhoetzel/ansible that referenced this issue Dec 5, 2019
juergenhoetzel added a commit to juergenhoetzel/ansible that referenced this issue Dec 5, 2019
amenonsen pushed a commit that referenced this issue Dec 6, 2019
* Don't return module error when mysql_connect fails (#64560)

mysql_user expects an Exception when using check_implicit_admin.

* Adds integration tests for mysql_user check_implicit_admin (#64560)
Andersson007 pushed a commit to Andersson007/ansible that referenced this issue Dec 6, 2019
…nsible#64585)

* Don't return module error when mysql_connect fails (ansible#64560)

mysql_user expects an Exception when using check_implicit_admin.

* Adds integration tests for mysql_user check_implicit_admin (ansible#64560)

(cherry picked from commit 47aea84)
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Dec 6, 2019
anshulbehl pushed a commit to anshulbehl/ansible that referenced this issue Dec 10, 2019
…nsible#64585)

* Don't return module error when mysql_connect fails (ansible#64560)

mysql_user expects an Exception when using check_implicit_admin.

* Adds integration tests for mysql_user check_implicit_admin (ansible#64560)
@ansible ansible locked and limited conversation to collaborators Jan 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. database Database category has_pr This issue has an associated PR. module This issue/PR relates to a module. mysql support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

No branches or pull requests

7 participants