Closed jchoponis closed 3 years ago
I have the same issue and I’m using an almost identical setup, but with Vagrant and VirtualBox. I noticed it skips task Create error log file (if configured).
, therefore Ansible didn’t create file /var/log/mysqld.err
and the mysqld user is not allowed to create that file in runtime.
My first idea was that the task was being skipped because of its tag skip_ansible_galaxy
(guess the name pushed me in the wrong direction). Turns out that the when
condition is the cause. Solution is to also configure mysql_log
. For example:
- name: Override variables for MySQL (RedHat)
set_fact:
# (…)
mysql_log: /var/log/mysqld
mysql_log_error: syslog: /var/log/mysqld.err
# (…)
when: ansible_os_family == "RedHat"
any updates regarding this issue?
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
I'm trying to use this module to spin up a vanilla MySQL 5.7 instance on a plain CentOS 7 VM some testing and it fails at the step named "Ensure MySQL is started and enabled on boot.".
Based on the list of evidence below, I'm hoping someone else might look at this and spot the issue. This looks like some kind of permissions bug/issue per the systemctl output of:
Nov 06 09:31:40 centos7x64-1 mysqld_safe[15562]: /usr/bin/mysqld_safe: line 616: /var/log/mysqld.err: Permission denied
, but I'm not 100% sure yet.In case anyone notes I'm using password authentication (and exposing those passwords below), that's OK for me as this is just an isolated, expendable lab environment. As we know, robust deployments should use SSH keys, and that is just not a goal for this specific exercise.
Any insights about this issue welcome - thanks for reading!
Here's the journalctl output:
Here's the systemctl output:
My ansible version on the mac os box driving the playbook:
CentOS version:
Role version per
roles/geerlingguy.mysql/meta/.galaxy_install_info
And the playbook:
The bash script I'm using to run that playbook.
Also, I'm using Mac OS 10.15.7 and VMware Fusion 11.5.6, in case these matter.