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

Update root pwd #46

Open
grahamrhay opened this issue Nov 5, 2020 · 3 comments
Open

Update root pwd #46

grahamrhay opened this issue Nov 5, 2020 · 3 comments

Comments

@grahamrhay
Copy link

Running v3.1 of the role with an old mariadb version, and a root pwd:

    - role: bertvv.mariadb
      become: yes 
      vars:
        mariadb_version: 10.1
        mariadb_root_password: ***

fails:

TASK [bertvv.mariadb : Check if a custom root password is specified] *************************************************************************************************************************
skipping: [gg-core-test-app-0]

TASK [bertvv.mariadb : Check if root password is unset] **************************************************************************************************************************************
fatal: [gg-core-test-app-0]: FAILED! => {"changed": false, "cmd": "mysql -u root -p'***' -h localhost -S /var/lib/mysql/mysql.sock -e \"quit\"\n", "delta": "0:00:00.017762", "end": "2020-11-05 11:01:53.457887", "msg": "non-zero return code", "rc": 1, "start": "2020-11-05 11:01:53.440125", "stderr": "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)", "stderr_lines": ["ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"], "stdout": "", "stdout_lines": []}
...ignoring

TASK [bertvv.mariadb : Check if the specified root password is already set] ******************************************************************************************************************
fatal: [gg-core-test-app-0]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false}

(and also logs the new root pwd, which isn't ideal)

It seems to have been caused by this change, which has inverted the behaviour of the task at L14. I tried removing L17, which got me a bit further. And I then had to add a login_user to the mysql_user tasks below. But I just ground to a halt on this task, and decided I should probably accept that I had no idea what I was doing.

I'd be happy to provide a PR, but I don't think I really understand the problem/solution well enough.

@grahamrhay
Copy link
Author

I'm using v3.0 for now, which seems to work correctly for my scenario, but I'd prefer not to miss out on any improvements

@chrisdeeming
Copy link

Just wanted to add I'm also experiencing this with newer versions too - 10.3 specifically for this issue.

I need to try it again but 10.4 totally failed for other reasons.

@grahamrhay
Copy link
Author

the auth changed in 10.4, so this will affect any version older than that:

https://github.com/bertvv/ansible-role-mariadb/blob/master/tasks/main.yml#L30

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