Skip to content
Snippets Groups Projects
Commit 47c33cea authored by Chris Croome's avatar Chris Croome
Browse files

Add transaction_isolation and binlog_format options

parent 64549f37
No related branches found
Tags 1.3.1
No related merge requests found
Pipeline #24200 passed
......@@ -50,6 +50,8 @@ See also the [defaults/main.yml](defaults/main.yml) file.
| `mariadb_innodb_buffer_pool_size` | `1G` | |
| `mariadb_innodb_log_file_size` | `256M` | |
| `mariadb_innodb_buffer_pool_instances` | `1` | |
| `mariadb_transaction_isolation` | | Not defined by default, for [Nextcloud](https://docs.nextcloud.com/server/25/admin_manual/configuration_database/linux_database_configuration.html) |
| `mariadb_binlog_format` | | Not defined by default, for [Nextcloud](https://docs.nextcloud.com/server/25/admin_manual/configuration_database/linux_database_configuration.html) |
| `mariadb_query_cache_type` | `0` | |
| `mariadb_query_cache_limit` | `0` | |
| `mariadb_query_cache_size` | `0` | |
......@@ -93,6 +95,17 @@ You can call the `mariadb_user.yml` tasks multiple times, for example:
- debug:
msg: "The MariaDB password for Matomo is: {{ mariadb_password }}"
- name: Create database and user for Nextcloud
include_role:
name: mariadb
tasks_from: mariadb_user.yml
vars:
mariadb_database: nextcloud
mariadb_username: nextcloud
- debug:
msg: "The MariaDB password for Nextcloud is: {{ mariadb_password }}"
```
Note that the `mariadb_password` variable will contain the password for the last user created.
......@@ -40,6 +40,9 @@ mariadb_thread_concurrency: 10
mariadb_innodb_buffer_pool_size: 1G
mariadb_innodb_log_file_size: 256M
mariadb_innodb_buffer_pool_instances: 1
# https://docs.nextcloud.com/server/25/admin_manual/configuration_database/linux_database_configuration.html#database-read-committed-transaction-isolation-level
# mariadb_transaction_isolation: READ-COMMITTED
# mariadb_binlog_format: ROW
# Query cache configuration
# https://mariadb.com/kb/en/query-cache/
......
......@@ -9,7 +9,7 @@ galaxy_info:
description: Webarchitects Ansible role for installing and configuring MariaDB on Debian servers
company: Webarchitects Co-operative
license: GNU General Public License v3.0 (GPLv3)
min_ansible_version: 2.10
min_ansible_version: "2.10"
platforms:
- name: debian
versions:
......@@ -17,13 +17,9 @@ galaxy_info:
- bullseye
- buster
- stretch
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
galaxy_tags:
- debian
- mariadb
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
......
......@@ -47,6 +47,9 @@ table_open_cache = {{ mariadb_table_open_cache | default('2000') }}
tmp_table_size = {{ mariadb_tmp_table_size | default('32M') }}
join_buffer_size = {{ mariadb_join_buffer_size | default('256K') }}
max_heap_table_size = {{ mariadb_max_heap_table_size | default('16M') }}
{% if mariadb_transaction_isolation is defined %}
transaction_isolation = {{ mariadb_transaction_isolation }}
{% endif %}
#
# * Query Cache Configuration
......@@ -86,6 +89,9 @@ expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = exclude_database_name
{% if mariadb_binlog_format is defined %}
binlog_format = {{ mariadb_binlog_format }}
{% endif %}
#
# * InnoDB
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment