8343-New-machine-id #48
|
@ -13,6 +13,13 @@
|
|||
with_fileglob:
|
||||
- "files/z9*.cnf"
|
||||
notify: restart-mariadb
|
||||
- name: Ensure mariadb service override directory exists
|
||||
file:
|
||||
path: /etc/systemd/system/mariadb.service.d
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
- name: Set MariaDB custom service.d override.conf
|
||||
copy:
|
||||
src: mariadb_override.conf
|
||||
|
@ -21,17 +28,24 @@
|
|||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
notify: restart-mariadb
|
||||
- name: Ensure scripts root directory exists
|
||||
file:
|
||||
path: /root/scripts
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
- name: Set MariaDB custom root scripts
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: /root/scripts
|
||||
dest: /root/scripts/
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rwx,g=rx,o=rx
|
||||
with_fileglob:
|
||||
- "files/scripts/*.sh"
|
||||
notify: restart-mariadb
|
||||
- name: Set MariaDB README root scripts
|
||||
- name: Set MariaDB README root script
|
||||
copy:
|
||||
src: files/scripts/README.md
|
||||
dest: /root/scripts/README.md
|
||||
|
@ -39,3 +53,19 @@
|
|||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
notify: restart-mariadb
|
||||
- name: Set MariaDB performance and customize root script
|
||||
copy:
|
||||
src: files/scripts/mysqltuner.pl
|
||||
dest: /root/scripts/mysqltuner.pl
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rwx,g=rx,o=rx
|
||||
notify: restart-mariadb
|
||||
- name: Set MariaDB Cron to /etc/cron.d
|
||||
copy:
|
||||
src: templates/cron_mariadb
|
||||
dest: /etc/cron.d/vn
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
notify: restart-mariadb
|
|
@ -0,0 +1,4 @@
|
|||
MAILTO="{{ sysadmin_mail }}"
|
||||
|
||||
*/15 * * * * root /root/scripts/check-memory.sh
|
||||
*/30 * * * * root /root/scripts/scheduler-log.sh
|
Loading…
Reference in New Issue