From cfcbfbc63ed5148091bd7bbd7491acf713403281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 22 Jan 2025 09:20:40 +0100 Subject: [PATCH 1/6] refs #8414 - Add config files for test-db --- roles/services/files/z90-vn-test-db.cnf | 100 +++++++++++++++++++++ roles/services/files/z92-testing.cnf | 3 + roles/services/files/z99-local-test-db.cnf | 6 ++ 3 files changed, 109 insertions(+) create mode 100644 roles/services/files/z90-vn-test-db.cnf create mode 100644 roles/services/files/z92-testing.cnf create mode 100644 roles/services/files/z99-local-test-db.cnf diff --git a/roles/services/files/z90-vn-test-db.cnf b/roles/services/files/z90-vn-test-db.cnf new file mode 100644 index 0000000..3a96c74 --- /dev/null +++ b/roles/services/files/z90-vn-test-db.cnf @@ -0,0 +1,100 @@ +[mysqld] +# Docs: https://mariadb.com/kb/en/server-system-variables + +lc_messages = es_ES +lc_time_names = es_ES +character-set-server = utf8 +collation-server = utf8_unicode_ci +explicit_defaults_for_timestamp = ON +datadir = /mnt/mysqldata/ +tmpdir = /mnt/mysqltmp + +#++++++++++++++++++++++++++++++++++++++++ Binary log + +log-bin = bin.log +max_binlog_size = 1GB +binlog_cache_size = 16M +binlog_stmt_cache_size = 16M +expire_logs_days = 1 +binlog_row_image = noblob +binlog_format = row +relay_log = mysqld-relay-bin + +#++++++++++++++++++++++++++++++++++++++++ Threads + +max_connections = 1000 +thread_stack = 512K +join_buffer_size = 2M +sort_buffer_size = 4M +net_buffer_length = 256K +max_allowed_packet = 16M +read_buffer_size = 1M +read_rnd_buffer_size = 512K + +#++++++++++++++++++++++++++++++++++++++++ Performance + +thread_cache_size = 450 +interactive_timeout = 1800 +wait_timeout = 1800 +open_files_limit = 62000 +low_priority_updates = 1 +table_open_cache = 28000 +table_definition_cache = 14000 +table_open_cache_instances = 1 +key_buffer_size = 8M +max_heap_table_size = 256M +tmp_table_size = 256M +concurrent_insert = ALWAYS +group_concat_max_len = 10000 +max_connect_errors = 50 + +#++++++++++++++++++++++++++++++++++++++++ Query cache + +query_cache_limit = 0 +query_cache_type = OFF +query_cache_size = 0 + +#++++++++++++++++++++++++++++++++++++++++ InnoDB + +transaction-isolation = READ-COMMITTED +innodb_io_capacity = 100 +innodb_io_capacity_max = 100 +innodb_monitor_enable = all +innodb_read_io_threads = 16 +innodb_write_io_threads = 16 +innodb_checksum_algorithm = crc32 +innodb_adaptive_hash_index = 0 +innodb_flush_method = O_DIRECT +innodb_log_buffer_size = 32M +innodb_log_file_size = 5G +innodb_purge_threads = 4 +innodb_buffer_pool_dump_at_shutdown = ON +innodb_buffer_pool_load_at_startup = ON + +#++++++++++++++++++++++++++++++++++++++++ SSL + +ssl-ca = /etc/mysql/ca.pem +ssl-cert = /etc/mysql/cert.pem +ssl-key = /etc/mysql/key.pem + +#++++++++++++++++++++++++++++++++++++++++ Logging + +log_error = /var/log/mysql/error.log +log_warnings = 2 +log_output = TABLE +general_log = OFF +slow_query_log = ON +long_query_time = 2 +min_examined_row_limit = 0 +log_slow_admin_statements = ON +log_queries_not_using_indexes = OFF +max_error_count = 100 + +#++++++++++++++++++++++++++++++++++++++++ Performance Schema + +performance_schema = ON +performance_schema_digests_size = 20000 +performance-schema-consumer-events-statements-history = ON +performance_schema_consumer_events_statements_history_long = ON +query_response_time_stats = ON +userstat = ON diff --git a/roles/services/files/z92-testing.cnf b/roles/services/files/z92-testing.cnf new file mode 100644 index 0000000..8dcb444 --- /dev/null +++ b/roles/services/files/z92-testing.cnf @@ -0,0 +1,3 @@ +[mysqld] + +event-scheduler = OFF diff --git a/roles/services/files/z99-local-test-db.cnf b/roles/services/files/z99-local-test-db.cnf new file mode 100644 index 0000000..44eea3c --- /dev/null +++ b/roles/services/files/z99-local-test-db.cnf @@ -0,0 +1,6 @@ +[mysqld] + +server-id = 1 +port = 3307 +bind-address = 0.0.0.0 +innodb_buffer_pool_size = 18G -- 2.40.1 From acbec25d9849d7dc2399e92481acc21247edb223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 22 Jan 2025 09:32:26 +0100 Subject: [PATCH 2/6] refs #8414 - Add config files for test-db change names --- ...vn-test-db.cnf => test-z90-vn-test-db.cnf} | 0 .../{z92-testing.cnf => test-z92-testing.cnf} | 0 ...test-db.cnf => test-z99-local-test-db.cnf} | 0 roles/services/tasks/mariadb.yml | 58 +++++++++++++------ 4 files changed, 40 insertions(+), 18 deletions(-) rename roles/services/files/{z90-vn-test-db.cnf => test-z90-vn-test-db.cnf} (100%) rename roles/services/files/{z92-testing.cnf => test-z92-testing.cnf} (100%) rename roles/services/files/{z99-local-test-db.cnf => test-z99-local-test-db.cnf} (100%) diff --git a/roles/services/files/z90-vn-test-db.cnf b/roles/services/files/test-z90-vn-test-db.cnf similarity index 100% rename from roles/services/files/z90-vn-test-db.cnf rename to roles/services/files/test-z90-vn-test-db.cnf diff --git a/roles/services/files/z92-testing.cnf b/roles/services/files/test-z92-testing.cnf similarity index 100% rename from roles/services/files/z92-testing.cnf rename to roles/services/files/test-z92-testing.cnf diff --git a/roles/services/files/z99-local-test-db.cnf b/roles/services/files/test-z99-local-test-db.cnf similarity index 100% rename from roles/services/files/z99-local-test-db.cnf rename to roles/services/files/test-z99-local-test-db.cnf diff --git a/roles/services/tasks/mariadb.yml b/roles/services/tasks/mariadb.yml index f9ec533..30a9aba 100644 --- a/roles/services/tasks/mariadb.yml +++ b/roles/services/tasks/mariadb.yml @@ -88,22 +88,44 @@ group: mysql mode: u=rw,g=,o= -- name: Set MariaDB custom configuration - copy: - src: "{{ item }}" - dest: /etc/mysql/mariadb.conf.d/ - owner: root - group: root - mode: u=rw,g=r,o=r - with_fileglob: - - "files/z9*.cnf" - notify: restart-mariadb +- when: production is true + block: + - name: Set MariaDB custom configuration + copy: + src: "{{ item }}" + dest: /etc/mysql/mariadb.conf.d/ + owner: root + group: root + mode: u=rw,g=r,o=r + with_fileglob: + - "files/z9*.cnf" + notify: restart-mariadb + + - name: Reminder to check mount points + debug: + msg: | + Remember to check the following mount points: + - /var/lib/mysql + - /mnt/mysqlbin + - /mnt/local-backup + Make sure they are correctly configured and accessible. -- name: Reminder to check mount points - debug: - msg: | - Remember to check the following mount points: - - /var/lib/mysql - - /mnt/mysqlbin - - /mnt/local-backup - Make sure they are correctly configured and accessible. +- when: test-db is true + block: + - name: Set MariaDB custom configuration + copy: + src: "{{ item }}" + dest: /etc/mysql/mariadb.conf.d/ + owner: root + group: root + mode: u=rw,g=r,o=r + with_fileglob: + - "files/test*.cnf" + notify: restart-mariadb + + - name: Reminder to check mount points + debug: + msg: | + Remember to check the following mount points: + - /mnt/mysqltmp + Make sure they are correctly configured and accessible. \ No newline at end of file -- 2.40.1 From 858651acb55d88e10d0eda6da845bd8ae04de46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 22 Jan 2025 10:43:59 +0100 Subject: [PATCH 3/6] refs #8414 - Add config files for test-db when block condition --- .../files/{test-z90-vn-test-db.cnf => test/z90-vn.cnf} | 2 +- .../files/{test-z92-testing.cnf => test/z92-testing.cnf} | 0 .../{test-z99-local-test-db.cnf => test/z99-local.cnf} | 0 roles/services/tasks/mariadb.yml | 8 ++++---- 4 files changed, 5 insertions(+), 5 deletions(-) rename roles/services/files/{test-z90-vn-test-db.cnf => test/z90-vn.cnf} (98%) rename roles/services/files/{test-z92-testing.cnf => test/z92-testing.cnf} (100%) rename roles/services/files/{test-z99-local-test-db.cnf => test/z99-local.cnf} (100%) diff --git a/roles/services/files/test-z90-vn-test-db.cnf b/roles/services/files/test/z90-vn.cnf similarity index 98% rename from roles/services/files/test-z90-vn-test-db.cnf rename to roles/services/files/test/z90-vn.cnf index 3a96c74..b705a22 100644 --- a/roles/services/files/test-z90-vn-test-db.cnf +++ b/roles/services/files/test/z90-vn.cnf @@ -96,5 +96,5 @@ performance_schema = ON performance_schema_digests_size = 20000 performance-schema-consumer-events-statements-history = ON performance_schema_consumer_events_statements_history_long = ON -query_response_time_stats = ON +#query_response_time_stats = ON userstat = ON diff --git a/roles/services/files/test-z92-testing.cnf b/roles/services/files/test/z92-testing.cnf similarity index 100% rename from roles/services/files/test-z92-testing.cnf rename to roles/services/files/test/z92-testing.cnf diff --git a/roles/services/files/test-z99-local-test-db.cnf b/roles/services/files/test/z99-local.cnf similarity index 100% rename from roles/services/files/test-z99-local-test-db.cnf rename to roles/services/files/test/z99-local.cnf diff --git a/roles/services/tasks/mariadb.yml b/roles/services/tasks/mariadb.yml index 30a9aba..081ed7e 100644 --- a/roles/services/tasks/mariadb.yml +++ b/roles/services/tasks/mariadb.yml @@ -90,7 +90,7 @@ - when: production is true block: - - name: Set MariaDB custom configuration + - name: Set MariaDB custom configuration Producution copy: src: "{{ item }}" dest: /etc/mysql/mariadb.conf.d/ @@ -110,9 +110,9 @@ - /mnt/local-backup Make sure they are correctly configured and accessible. -- when: test-db is true +- when: testdb is true block: - - name: Set MariaDB custom configuration + - name: Set MariaDB custom configuration Test copy: src: "{{ item }}" dest: /etc/mysql/mariadb.conf.d/ @@ -120,7 +120,7 @@ group: root mode: u=rw,g=r,o=r with_fileglob: - - "files/test*.cnf" + - "files/test/z9*.cnf" notify: restart-mariadb - name: Reminder to check mount points -- 2.40.1 From 97cce8b29c62e2362367d62561ab9570301392ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 22 Jan 2025 10:46:06 +0100 Subject: [PATCH 4/6] refs #8414 - Add config files for test-db when block condition errata in name --- roles/services/tasks/mariadb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/services/tasks/mariadb.yml b/roles/services/tasks/mariadb.yml index 081ed7e..d975218 100644 --- a/roles/services/tasks/mariadb.yml +++ b/roles/services/tasks/mariadb.yml @@ -90,7 +90,7 @@ - when: production is true block: - - name: Set MariaDB custom configuration Producution + - name: Set MariaDB custom configuration Production copy: src: "{{ item }}" dest: /etc/mysql/mariadb.conf.d/ -- 2.40.1 From f590915e0e868f0566caaa01b1dc5767234bb37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 22 Jan 2025 13:04:37 +0100 Subject: [PATCH 5/6] refs #8414 - Reorder files --- roles/services/files/test/z90-vn.cnf | 100 ------------------ roles/services/files/test/z92-testing.cnf | 3 - roles/services/files/test/z99-local.cnf | 6 -- roles/services/files/z90-vn.cnf | 21 ---- roles/services/files/z92-testing.cnf | 14 +++ roles/services/files/z95-production.cnf | 23 ++++ .../{files => templates}/z99-local.cnf | 0 7 files changed, 37 insertions(+), 130 deletions(-) delete mode 100644 roles/services/files/test/z90-vn.cnf delete mode 100644 roles/services/files/test/z92-testing.cnf delete mode 100644 roles/services/files/test/z99-local.cnf create mode 100644 roles/services/files/z92-testing.cnf rename roles/services/{files => templates}/z99-local.cnf (100%) diff --git a/roles/services/files/test/z90-vn.cnf b/roles/services/files/test/z90-vn.cnf deleted file mode 100644 index b705a22..0000000 --- a/roles/services/files/test/z90-vn.cnf +++ /dev/null @@ -1,100 +0,0 @@ -[mysqld] -# Docs: https://mariadb.com/kb/en/server-system-variables - -lc_messages = es_ES -lc_time_names = es_ES -character-set-server = utf8 -collation-server = utf8_unicode_ci -explicit_defaults_for_timestamp = ON -datadir = /mnt/mysqldata/ -tmpdir = /mnt/mysqltmp - -#++++++++++++++++++++++++++++++++++++++++ Binary log - -log-bin = bin.log -max_binlog_size = 1GB -binlog_cache_size = 16M -binlog_stmt_cache_size = 16M -expire_logs_days = 1 -binlog_row_image = noblob -binlog_format = row -relay_log = mysqld-relay-bin - -#++++++++++++++++++++++++++++++++++++++++ Threads - -max_connections = 1000 -thread_stack = 512K -join_buffer_size = 2M -sort_buffer_size = 4M -net_buffer_length = 256K -max_allowed_packet = 16M -read_buffer_size = 1M -read_rnd_buffer_size = 512K - -#++++++++++++++++++++++++++++++++++++++++ Performance - -thread_cache_size = 450 -interactive_timeout = 1800 -wait_timeout = 1800 -open_files_limit = 62000 -low_priority_updates = 1 -table_open_cache = 28000 -table_definition_cache = 14000 -table_open_cache_instances = 1 -key_buffer_size = 8M -max_heap_table_size = 256M -tmp_table_size = 256M -concurrent_insert = ALWAYS -group_concat_max_len = 10000 -max_connect_errors = 50 - -#++++++++++++++++++++++++++++++++++++++++ Query cache - -query_cache_limit = 0 -query_cache_type = OFF -query_cache_size = 0 - -#++++++++++++++++++++++++++++++++++++++++ InnoDB - -transaction-isolation = READ-COMMITTED -innodb_io_capacity = 100 -innodb_io_capacity_max = 100 -innodb_monitor_enable = all -innodb_read_io_threads = 16 -innodb_write_io_threads = 16 -innodb_checksum_algorithm = crc32 -innodb_adaptive_hash_index = 0 -innodb_flush_method = O_DIRECT -innodb_log_buffer_size = 32M -innodb_log_file_size = 5G -innodb_purge_threads = 4 -innodb_buffer_pool_dump_at_shutdown = ON -innodb_buffer_pool_load_at_startup = ON - -#++++++++++++++++++++++++++++++++++++++++ SSL - -ssl-ca = /etc/mysql/ca.pem -ssl-cert = /etc/mysql/cert.pem -ssl-key = /etc/mysql/key.pem - -#++++++++++++++++++++++++++++++++++++++++ Logging - -log_error = /var/log/mysql/error.log -log_warnings = 2 -log_output = TABLE -general_log = OFF -slow_query_log = ON -long_query_time = 2 -min_examined_row_limit = 0 -log_slow_admin_statements = ON -log_queries_not_using_indexes = OFF -max_error_count = 100 - -#++++++++++++++++++++++++++++++++++++++++ Performance Schema - -performance_schema = ON -performance_schema_digests_size = 20000 -performance-schema-consumer-events-statements-history = ON -performance_schema_consumer_events_statements_history_long = ON -#query_response_time_stats = ON -userstat = ON diff --git a/roles/services/files/test/z92-testing.cnf b/roles/services/files/test/z92-testing.cnf deleted file mode 100644 index 8dcb444..0000000 --- a/roles/services/files/test/z92-testing.cnf +++ /dev/null @@ -1,3 +0,0 @@ -[mysqld] - -event-scheduler = OFF diff --git a/roles/services/files/test/z99-local.cnf b/roles/services/files/test/z99-local.cnf deleted file mode 100644 index 44eea3c..0000000 --- a/roles/services/files/test/z99-local.cnf +++ /dev/null @@ -1,6 +0,0 @@ -[mysqld] - -server-id = 1 -port = 3307 -bind-address = 0.0.0.0 -innodb_buffer_pool_size = 18G diff --git a/roles/services/files/z90-vn.cnf b/roles/services/files/z90-vn.cnf index 0f6a716..b6b244b 100644 --- a/roles/services/files/z90-vn.cnf +++ b/roles/services/files/z90-vn.cnf @@ -42,30 +42,11 @@ max_connect_errors = 50 #++++++++++++++++++++++++++++++++++++++++ Binary log -log-bin = /mnt/mysqlbin/binlog/bin.log max_binlog_size = 1GB binlog_cache_size = 16M binlog_stmt_cache_size = 16M binlog_row_image = noblob binlog_format = row -relay_log = /mnt/mysqlbin/binlog/relay.log - -binlog-ignore-db = tmp -binlog-ignore-db = PERCONA_SCHEMA - -#++++++++++++++++++++++++++++++++++++++++ Replication - -event-scheduler = ON -slave_exec_mode = STRICT - -replicate-ignore-db = tmp -replicate-ignore-table = util.eventLog -replicate-ignore-table = cache.cache_calc -replicate-ignore-table = cache.available -replicate-ignore-table = cache.availableNoRaids -replicate-ignore-table = cache.cache_valid -replicate-ignore-table = cache.stock -replicate-ignore-table = cache.visible #++++++++++++++++++++++++++++++++++++++++ InnoDB @@ -80,7 +61,6 @@ innodb_checksum_algorithm = crc32 innodb_adaptive_hash_index = 0 innodb_flush_method = O_DIRECT innodb_log_buffer_size = 32M -innodb_log_file_size = 8G innodb_purge_threads = 4 innodb_buffer_pool_dump_at_shutdown = ON innodb_buffer_pool_load_at_startup = ON @@ -88,7 +68,6 @@ innodb_buffer_pool_load_at_startup = ON #++++++++++++++++++++++++++++++++++++++++ Logging log_error = /var/log/mysql/error.log -log_warnings = 1 log_output = TABLE general_log = OFF slow_query_log = ON diff --git a/roles/services/files/z92-testing.cnf b/roles/services/files/z92-testing.cnf new file mode 100644 index 0000000..e37ef52 --- /dev/null +++ b/roles/services/files/z92-testing.cnf @@ -0,0 +1,14 @@ +[mysqld] + +port = 3307 +bind-address = 0.0.0.0 +innodb_buffer_pool_size = 18G +event-scheduler = OFF +innodb_log_file_size = 5G +log_warnings = 2 + +#++++++++++++++++++++++++++++++++++++++++ Binary log + +log-bin = bin.log +expire_logs_days = 1 +relay_log = mysqld-relay-bin diff --git a/roles/services/files/z95-production.cnf b/roles/services/files/z95-production.cnf index 17f9732..0861a85 100644 --- a/roles/services/files/z95-production.cnf +++ b/roles/services/files/z95-production.cnf @@ -1,6 +1,29 @@ [mysqld] port = 3306 +innodb_log_file_size = 8G +log_warnings = 1 + +#++++++++++++++++++++++++++++++++++++++++ Binary log + +log-bin = /mnt/mysqlbin/binlog/bin.log max_connections = 1000 expire_logs_days = 7 innodb_buffer_pool_size = 64G +relay_log = /mnt/mysqlbin/binlog/relay.log +binlog-ignore-db = tmp +binlog-ignore-db = PERCONA_SCHEMA + +#++++++++++++++++++++++++++++++++++++++++ Replication + +event-scheduler = ON +slave_exec_mode = STRICT + +replicate-ignore-db = tmp +replicate-ignore-table = util.eventLog +replicate-ignore-table = cache.cache_calc +replicate-ignore-table = cache.available +replicate-ignore-table = cache.availableNoRaids +replicate-ignore-table = cache.cache_valid +replicate-ignore-table = cache.stock +replicate-ignore-table = cache.visible diff --git a/roles/services/files/z99-local.cnf b/roles/services/templates/z99-local.cnf similarity index 100% rename from roles/services/files/z99-local.cnf rename to roles/services/templates/z99-local.cnf -- 2.40.1 From 42541659808e78c943f2c44f2f8c9f3e016e4a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 22 Jan 2025 13:58:05 +0100 Subject: [PATCH 6/6] refs #8414 - Reorder files and logic --- .../files/{ => mariaconfigfiles}/z90-vn.cnf | 2 +- .../{ => mariaconfigfiles}/z92-testing.cnf | 0 .../{ => mariaconfigfiles}/z95-production.cnf | 0 roles/services/tasks/mariadb.yml | 20 ++++++++++++++----- roles/services/templates/z99-local.cnf | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) rename roles/services/files/{ => mariaconfigfiles}/z90-vn.cnf (98%) rename roles/services/files/{ => mariaconfigfiles}/z92-testing.cnf (100%) rename roles/services/files/{ => mariaconfigfiles}/z95-production.cnf (100%) diff --git a/roles/services/files/z90-vn.cnf b/roles/services/files/mariaconfigfiles/z90-vn.cnf similarity index 98% rename from roles/services/files/z90-vn.cnf rename to roles/services/files/mariaconfigfiles/z90-vn.cnf index b6b244b..1911135 100644 --- a/roles/services/files/z90-vn.cnf +++ b/roles/services/files/mariaconfigfiles/z90-vn.cnf @@ -6,7 +6,7 @@ lc_time_names = es_ES character-set-server = utf8 collation-server = utf8_unicode_ci explicit_defaults_for_timestamp = ON -datadir = /var/lib/mysql +datadir = /mnt/mysqldata/mysql tmpdir = /mnt/mysqltmp log_bin_trust_function_creators = 1 sql_mode = NO_ENGINE_SUBSTITUTION diff --git a/roles/services/files/z92-testing.cnf b/roles/services/files/mariaconfigfiles/z92-testing.cnf similarity index 100% rename from roles/services/files/z92-testing.cnf rename to roles/services/files/mariaconfigfiles/z92-testing.cnf diff --git a/roles/services/files/z95-production.cnf b/roles/services/files/mariaconfigfiles/z95-production.cnf similarity index 100% rename from roles/services/files/z95-production.cnf rename to roles/services/files/mariaconfigfiles/z95-production.cnf diff --git a/roles/services/tasks/mariadb.yml b/roles/services/tasks/mariadb.yml index d975218..8866ad9 100644 --- a/roles/services/tasks/mariadb.yml +++ b/roles/services/tasks/mariadb.yml @@ -97,8 +97,9 @@ owner: root group: root mode: u=rw,g=r,o=r - with_fileglob: - - "files/z9*.cnf" + with_items: + - "files/mariaconfigfiles/z90-vn.cnf" + - "files/mariaconfigfiles/z95-production" notify: restart-mariadb - name: Reminder to check mount points @@ -119,8 +120,9 @@ owner: root group: root mode: u=rw,g=r,o=r - with_fileglob: - - "files/test/z9*.cnf" + with_items: + - "files/mariaconfigfiles/z90-vn.cnf" + - "files/mariaconfigfiles/z92-testing.cnf" notify: restart-mariadb - name: Reminder to check mount points @@ -128,4 +130,12 @@ msg: | Remember to check the following mount points: - /mnt/mysqltmp - Make sure they are correctly configured and accessible. \ No newline at end of file + Make sure they are correctly configured and accessible. + +- name: Set MariaDB local configuration file + template: + src: templates/z99-local.cnf + dest: /etc/mysql/mariadb.conf.d/ + owner: root + group: root + mode: u=rw,g=r,o=r \ No newline at end of file diff --git a/roles/services/templates/z99-local.cnf b/roles/services/templates/z99-local.cnf index 58249ee..a434496 100644 --- a/roles/services/templates/z99-local.cnf +++ b/roles/services/templates/z99-local.cnf @@ -1,6 +1,6 @@ [mysqld] -server-id = 1 +server-id = {{ serverid }} #bind-address = 127.0.0.1 #event-scheduler = OFF #skip-log-bin -- 2.40.1