diff --git a/CHANGELOG.md b/CHANGELOG.md index 183a13cb..4f444784 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The **patch** part changes incrementally at each release. * webapps/evoadmin-web Overload templates if needed * redis: max clients is configurable * generate-ldif: support MariaDB 10.3 +* mysql: activate binary logs by specifying log_bin path ### Changed * elasticsearch: listen on local interface only by default diff --git a/mysql/README.md b/mysql/README.md index 6941df20..f4ea0cc4 100644 --- a/mysql/README.md +++ b/mysql/README.md @@ -29,7 +29,7 @@ Tasks are extracted in several files, included in `tasks/main.yml` : * `mysql_tmp_table_size`: (default: `Null`, default evolinux config is then used) ; * `mysql_max_heap_table_size`: (default: `Null`, default evolinux config is then used) ; * `mysql_query_cache_limit`: (default: `Null`, default evolinux config is then used) ; -* `mysql_query_cache_size`: (default: `Null`, default evolinux config is then used) ; +* `mysql_log_bin`: (default: `Null`, activates binlogs if used) ; * `mysql_custom_datadir`: custom datadir. * `mysql_custom_tmpdir`: custom tmpdir. * `general_alert_email`: email address to send various alert messages (default: `root@localhost`). diff --git a/mysql/defaults/main.yml b/mysql/defaults/main.yml index c2cfa4b0..cd0dec38 100644 --- a/mysql/defaults/main.yml +++ b/mysql/defaults/main.yml @@ -29,7 +29,7 @@ mysql_tmp_table_size: Null mysql_max_heap_table_size: Null mysql_query_cache_limit: Null mysql_query_cache_size: Null - +mysql_log_bin: Null mysql_cron_optimize: True mysql_cron_optimize_frequency: weekly diff --git a/mysql/templates/evolinux-custom.cnf.j2 b/mysql/templates/evolinux-custom.cnf.j2 index 796a1429..044427bf 100644 --- a/mysql/templates/evolinux-custom.cnf.j2 +++ b/mysql/templates/evolinux-custom.cnf.j2 @@ -29,3 +29,6 @@ query_cache_limit = {{ mysql_query_cache_limit }} {% if mysql_query_cache_limit %} query_cache_size = {{ mysql_query_cache_size }} {% endif %} +{% if mysql_log_bin %} +log_bin = {{ mysql_log_bin }} +{% endif %}