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.
This commit is contained in:
David Glaser 2016-04-06 10:45:04 -04:00
parent 64a7b7357a
commit 1e75c2f3e3

View file

@ -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 }}"