Skip to content
Snippets Groups Projects
Commit a2b0357f authored by Thomas Schneider's avatar Thomas Schneider
Browse files

mysql: Add options to enable binlog

parent 1014451f
Branches
No related tags found
No related merge requests found
Pipeline #4394 passed
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
......@@ -8,3 +8,4 @@ mysql_backup_user: "backup"
mysql_backup_password: "{{ lookup('passwordstore', 'db/{{ ansible_hostname }}-mysql-backup create=true length=20') }}"
mysql_rsnapshot: false
mysql_enable_binlog: false
---
- name: Reload systemd
systemd:
daemon_reload: true
- name: Restart mariadb.service
systemd:
name: mariadb.service
state: restarted
......@@ -62,3 +62,22 @@
file:
path: /etc/cron.d/mysql-snapshot
state: absent
- name: Create mariadb.service override directory
file:
path: /etc/systemd/system/mariadb.service.d
state: directory
owner: root
group: root
mode: '0755'
- name: Configure binlog
template:
src: override.conf
dest: /etc/systemd/system/mariadb.service.d/override.conf
owner: root
group: root
mode: '0644'
notify:
- Reload systemd
- Restart mariadb.service
[Service]
Environment=MYSQLD_OPTS={{ '--log-bin' if mysql_enable_binlog }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment