bertvv / ansible-role-mariadb

Install MariaDB on RHEL/CentOS 7 or Fedora.
https://galaxy.ansible.com/bertvv/mariadb/
Other
145 stars 108 forks source link

Setting up root Password #9

Closed Rahulsharma0810 closed 6 years ago

Rahulsharma0810 commented 7 years ago

I am getting, when trying to pass root password in

# roles/mariadb/defaults/main.yml 
mariadb_root_password: 'secure'
TASK [Mariadb : Set MariaDB root password for the first time] ************************************************************************************
fatal: [271.AppDevelopment.server]: FAILED! => {"changed": false, "failed": true, "msg": "(1133, \"Can't find any matching row in the user table\")"}
        to retry, use: --limit @/Users/rvs/Repositories/Ansible/playbook.retry
bertvv commented 7 years ago

I cannot reproduce this error, can you provide some more information? A minimal failing playbook would help.

I set up a Vagrant test environment with v2.0.1 of this role and the following playbook:

# site.yml
---
- hosts: srv001
  become: true
  vars:
    mariadb_root_password: 'secure'
  roles:
    - bertvv.mariadb

In my test setup, this playbook finishes without errors, and mysql -uroot -psecure mysql works as expected.

The error message "Can't find any matching row in the user table" suggests that the root user doesn't exist anymore? Was the playbook applied on a clean installation?

bertvv commented 6 years ago

Since I haven't heard back from you, @Rahulsharma0810, I assume this isn't relevant anymore. I'm going to close this issue. Feel free to report it again if this still causes you problems, if possible with a minimal playbook that reproduces the error.