mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-10 11:50:18 +01:00
27 lines
812 B
YAML
27 lines
812 B
YAML
---
|
|
- name: Copy my.cnf global MySQL configuration.
|
|
template:
|
|
src: my.cnf.j2
|
|
dest: "{{ mysql_config_file }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
force: "{{ overwrite_global_mycnf }}"
|
|
notify: restart mysql
|
|
|
|
- name: Create slow query log file (if configured).
|
|
shell: "touch {{ mysql_slow_query_log_file }} creates={{ mysql_slow_query_log_file }}"
|
|
when: mysql_slow_query_log_enabled
|
|
|
|
- name: Set ownership on slow query log file (if configured).
|
|
file:
|
|
path: "{{ mysql_slow_query_log_file }}"
|
|
state: file
|
|
owner: mysql
|
|
group: mysql
|
|
mode: 0644
|
|
when: mysql_slow_query_log_enabled
|
|
|
|
- name: Ensure MySQL is started and enabled on boot.
|
|
service: "name={{ mysql_daemon }} state=started enabled={{ mysql_enabled_on_startup }}"
|
|
register: mysql_service_configuration
|