Skip to content

Commit ec01572

Browse files
committed
Mariadb docker: Add a mariadb config file
1 parent ebdde88 commit ec01572

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mariadb]
2+
sql_mode=NO_ENGINE_SUBSTITUTION

roles/mariadbdocker/tasks/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
community.docker.docker_volume:
44
name: openconext_mariadb
55
state: present
6+
- name: Create MariaDB config dir
7+
ansible.builtin.file:
8+
path: /opt/openconext/mariadb/
9+
owner: root
10+
group: root
11+
mode: "0755"
12+
state: directory
13+
14+
- name: Copy mariadb config file
15+
ansible.builtin.copy:
16+
src: settings.cnf
17+
dest: /opt/openconext/mariadb/settings.cnf
18+
owner: root
19+
group: root
20+
mode: "0644"
621

722
- name: Create MariaDB network
823
community.docker.docker_network:
@@ -26,6 +41,9 @@
2641
- type: volume
2742
source: openconext_mariadb
2843
target: /var/lib/mysql
44+
- type: bind
45+
source: /opt/openconext/mariadb/settings.cnf
46+
target: /etc/mysql/conf.d/settings.cnf
2947
env:
3048
MARIADB_ROOT_PASSWORD: "{{ mariadb_root_password }}"
3149

0 commit comments

Comments
 (0)