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
Error in "root password is present" step #326
Comments
Hey @saurabhnanda, did you set the |
I'm having the same issue in Debian buster. It looks like the default root user is restricted to a local socket connection and will not be permitted to login through the network interface (default = localhost). As a workaround, I set the root user password before loading the hardening role using the snippet below. - name: workaround for dev-sec.mysql-hardening
block:
- name: reset root user for mariadb by connecting to socket
mysql_user:
name: root
password: "{{ mysql_root_password }}"
login_unix_socket: /var/run/mysqld/mysqld.sock
- name: install .my.cnf with credentials
copy:
content: |
[client]
user=root
password='{{ mysql_root_password | mandatory }}'
dest: "{{ ansible_env.HOME}}/.my.cnf"
mode: 0400 A better solution will be to update the role with support for socket connections. |
They're supported now. |
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
Expected behavior
Don't expect this step to fail.
Actual behavior
OS / Environment
Ansible Version
Role Version
Seems to be 2.2.1
The text was updated successfully, but these errors were encountered: