8343-New-machine-id #48
|
@ -3,7 +3,6 @@
|
||||||
name: mariadb-server
|
name: mariadb-server
|
||||||
state: present
|
state: present
|
||||||
#install_recommends: no
|
#install_recommends: no
|
||||||
|
|
||||||
- name: Ensure required directories exist
|
- name: Ensure required directories exist
|
||||||
file:
|
file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
|
@ -18,7 +17,6 @@
|
||||||
- { path: /etc/systemd/system/mariadb.service.d, owner: root, group: root, mode: 'u=rwx,g=rx,o=rx' }
|
- { path: /etc/systemd/system/mariadb.service.d, owner: root, group: root, mode: 'u=rwx,g=rx,o=rx' }
|
||||||
- { path: /mnt/mysqltmp, owner: root, group: root, mode: 'u=rwx,g=rwx,o=rwxt' }
|
- { path: /mnt/mysqltmp, owner: root, group: root, mode: 'u=rwx,g=rwx,o=rwxt' }
|
||||||
- { path: /mnt/mysqlbin/binlog, owner: mysql, group: mysql, mode: 'u=rwx,g=,o=' }
|
- { path: /mnt/mysqlbin/binlog, owner: mysql, group: mysql, mode: 'u=rwx,g=,o=' }
|
||||||
|
|
||||||
- name: Set MariaDB custom configuration
|
- name: Set MariaDB custom configuration
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
|
@ -29,7 +27,6 @@
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- "files/z9*.cnf"
|
- "files/z9*.cnf"
|
||||||
notify: restart-mariadb
|
notify: restart-mariadb
|
||||||
|
|
||||||
- name: Set MariaDB custom root scripts
|
- name: Set MariaDB custom root scripts
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
|
@ -39,7 +36,6 @@
|
||||||
mode: u=rwx,g=rx,o=rx
|
mode: u=rwx,g=rx,o=rx
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- "files/scripts/*.sh"
|
- "files/scripts/*.sh"
|
||||||
|
|
||||||
- name: Ensure required files are copied to their destinations
|
- name: Ensure required files are copied to their destinations
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
|
@ -53,7 +49,6 @@
|
||||||
- { src: 'files/scripts/mysqltuner.pl', dest: '/root/scripts/mysqltuner.pl', mode: 'u=rwx,g=rx,o=rx' }
|
- { src: 'files/scripts/mysqltuner.pl', dest: '/root/scripts/mysqltuner.pl', mode: 'u=rwx,g=rx,o=rx' }
|
||||||
notify:
|
notify:
|
||||||
- reload systemd
|
- reload systemd
|
||||||
|
|
||||||
- name: Set MariaDB Cron to /etc/cron.d
|
- name: Set MariaDB Cron to /etc/cron.d
|
||||||
template:
|
template:
|
||||||
src: templates/cron_mariadb
|
src: templates/cron_mariadb
|
||||||
|
@ -61,14 +56,12 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
|
|
||||||
- name: Add tmpfs in /etc/fstab
|
- name: Add tmpfs in /etc/fstab
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/fstab
|
path: /etc/fstab
|
||||||
marker: "# {mark} ANSIBLE-MANAGED TMPFS ENTRY"
|
marker: "# {mark} ANSIBLE-MANAGED TMPFS ENTRY"
|
||||||
block: |
|
block: |
|
||||||
tmpfs /mnt/mysqltmp tmpfs rw,size=6144M 0 0
|
tmpfs /mnt/mysqltmp tmpfs rw,size=6144M 0 0
|
||||||
|
|
||||||
- name: Insert MySQL certificates
|
- name: Insert MySQL certificates
|
||||||
copy:
|
copy:
|
||||||
content: "{{ item.content }}"
|
content: "{{ item.content }}"
|
||||||
|
|
Loading…
Reference in New Issue