mysql: fix mysql optimize tasks
This commit is contained in:
parent
574cf3ab44
commit
d15bcc168e
|
@ -83,7 +83,7 @@
|
||||||
tags:
|
tags:
|
||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
- name: "Cron dir is present"
|
- name: "Cron dir for optimize is present"
|
||||||
file:
|
file:
|
||||||
path: "/etc/cron.{{ mysql_cron_optimize_frequency | mandatory }}"
|
path: "/etc/cron.{{ mysql_cron_optimize_frequency | mandatory }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -102,12 +102,36 @@
|
||||||
|
|
||||||
- name: "Disable cron to optimize MySQL"
|
- name: "Disable cron to optimize MySQL"
|
||||||
file:
|
file:
|
||||||
dest: /etc/cron.weekly/mysql-optimize.sh
|
dest: /etc/cron.{{ mysql_cron_optimize_frequency | mandatory }}/mysql-optimize.sh
|
||||||
state: absent
|
state: absent
|
||||||
when: not mysql_cron_optimize
|
when: not mysql_cron_optimize
|
||||||
tags:
|
tags:
|
||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
|
- name: "Cron dir for mysqltuner is present"
|
||||||
|
file:
|
||||||
|
path: "/etc/cron.{{ mysql_cron_mysqltuner_frequency | mandatory }}"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
- name: "Enable mysqltuner in cron"
|
||||||
|
copy:
|
||||||
|
src: mysqltuner.cron.sh
|
||||||
|
dest: /etc/cron.{{ mysql_cron_mysqltuner_frequency | mandatory }}/mysqltuner.sh
|
||||||
|
when: mysql_cron_mysqltuner
|
||||||
|
tags:
|
||||||
|
- mysql
|
||||||
|
|
||||||
|
- name: "Disable mysqltuner in cron"
|
||||||
|
file:
|
||||||
|
dest: /etc/cron.{{ mysql_cron_mysqltuner_frequency | mandatory }}/mysqltuner.sh
|
||||||
|
state: absent
|
||||||
|
when: not mysql_cron_mysqltuner
|
||||||
|
tags:
|
||||||
|
- mysql
|
||||||
|
|
||||||
# my-add.sh
|
# my-add.sh
|
||||||
|
|
||||||
- include: remount_usr_rw.yml
|
- include: remount_usr_rw.yml
|
||||||
|
|
Loading…
Reference in a new issue