# {{ ansible_managed }} [mariadb] # Basic settings {{ mariadb_basic_settings_raw }} # Fine tuning {{ mariadb_fine_tuning_raw }} # Logging {% if mariadb_replication_role != '' %} # warning log-basename is defined later for replication # some log option may be ignored. # see: https://mariadb.com/kb/en/mysqld-options/#-log-basename {% endif %} {{ mariadb_logging_raw }} # Query cache {{ mariadb_query_cache_raw }} # Character sets {{ mariadb_character_sets_raw }} # InnoDB {{ mariadb_innodb_raw }} {% if mariadb_replication_role != '' %} # Replication server-id = {{ mariadb_server_id }} log-basename = mariadb {% if mariadb_replication_role == 'primary' %} log_bin expire_logs_days = {{ mariadb_expire_logs_days }} max_binlog_size = {{ mariadb_max_binlog_size }} binlog_format = {{mariadb_binlog_format}} # the following permits to simplify the process of moving a replica to a # primary node role by ensuring that replication is not started on primary node skip-slave-start {% for db in mariadb_databases %} {% if db.replicate|default(false) %} binlog_do_db = {{ db.name }} {% else %} binlog_ignore_db = {{ db.name }} {% endif %} {% endfor %} {% endif %} {% if mariadb_replication_role == 'replica' %} read_only relay-log = relay-bin relay-log-index = relay-bin.index {% endif %} {% endif -%} {% if mariadb_ssl_cert is defined and mariadb_ssl_cert != "" and mariadb_ssl_key is defined and mariadb_ssl_key != "" %} ssl_cert = {{ mariadb_ssl_cert }} ssl_key = {{ mariadb_ssl_key }} {% endif %} {% if mariadb_ssl_ca is defined and mariadb_ssl_ca != "" and mariadb_ssl_ca is defined and mariadb_ssl_ca != "" %} ssl_ca = {{ mariadb_ssl_ca }} {% endif %} {% if mariadb_options is defined %} {% for key, value in mariadb_options.items() %} {{ key }} = {{ value }} {% endfor %} {% endif %} [mysqldump] {{ mariadb_mysqldump_raw }}