Skip to content

Commit

Permalink
Mariadb docker: Add a mariadb config file
Browse files Browse the repository at this point in the history
  • Loading branch information
quartje committed Dec 2, 2024
1 parent ebdde88 commit ec01572
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/mariadbdocker/files/settings.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mariadb]
sql_mode=NO_ENGINE_SUBSTITUTION
18 changes: 18 additions & 0 deletions roles/mariadbdocker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
community.docker.docker_volume:
name: openconext_mariadb
state: present
- name: Create MariaDB config dir
ansible.builtin.file:
path: /opt/openconext/mariadb/
owner: root
group: root
mode: "0755"
state: directory

- name: Copy mariadb config file
ansible.builtin.copy:
src: settings.cnf
dest: /opt/openconext/mariadb/settings.cnf
owner: root
group: root
mode: "0644"

- name: Create MariaDB network
community.docker.docker_network:
Expand All @@ -26,6 +41,9 @@
- type: volume
source: openconext_mariadb
target: /var/lib/mysql
- type: bind
source: /opt/openconext/mariadb/settings.cnf
target: /etc/mysql/conf.d/settings.cnf
env:
MARIADB_ROOT_PASSWORD: "{{ mariadb_root_password }}"

Expand Down

0 comments on commit ec01572

Please sign in to comment.