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

Execute check of MySQL error logfile permissions on Debian 11 only when log_error is defined #477

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/mysql_hardening/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
owner: '{{ mysql_hardening_user }}'
group: '{{ mysql_hardening_group }}'
mode: '0640'
when: mysql_settings.settings.log_error != ""

- name: Check mysql configuration-directory exists and has right permissions
file:
Expand Down
6 changes: 6 additions & 0 deletions roles/mysql_hardening/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
login_unix_socket: "{{ login_unix_socket | default(omit) }}"
register: mysql_version

- name: Check MySQL/MariaDB settings
community.mysql.mysql_info:
filter: settings
login_unix_socket: "{{ login_unix_socket | default(omit) }}"
register: mysql_settings

# see https://stackoverflow.com/a/59451077/2953919 for the
# dict2items and vice versa magic
- name: Drop the secure-auth parameter on MySQL >=8.0.3 (not mariadb)
Expand Down