Verify that datadir has been created and selinux context set. Currently

selinux context set separately because I'm not sure that Ubuntu has it
installed in all cases.
pull/63/head
David Glaser 8 years ago
parent 64a7b7357a
commit 1e75c2f3e3
  1. 13
      tasks/configure.yml

@ -33,6 +33,19 @@
file: "path={{ mysql_slow_query_log_file }} state=touch"
when: mysql_slow_query_log_enabled
- name: Create datadir if it does not exist
file:
path: "{{ mysql_datadir }}"
state: directory
owner: mysql
group: mysql
mode: 0755
- name: Set selinux context on datadir
file:
path: "{{ mysql_datadir }}"
setype: mysqld_db_t
- name: Set ownership on slow query log file (if configured).
file:
path: "{{ mysql_slow_query_log_file }}"