2024-09-09 22:37:51 +10:00
|
|
|
---
|
|
|
|
- name: Set Facts
|
|
|
|
set_fact:
|
|
|
|
container_name: 'mariadb'
|
|
|
|
|
|
|
|
- name: Create directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
2024-09-10 22:09:43 +10:00
|
|
|
- "{{ data_folder }}/mariadb"
|
|
|
|
- "{{ data_folder }}/mariadb/config"
|
2024-09-09 22:37:51 +10:00
|
|
|
|
|
|
|
- name: Create the mariadb container
|
|
|
|
docker_container:
|
|
|
|
name: "mariadb"
|
|
|
|
image: ghcr.io/linuxserver/mariadb:10.11.8
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
recreate: true
|
|
|
|
ports:
|
|
|
|
- 3306:3306
|
|
|
|
env:
|
|
|
|
PUID: "0"
|
|
|
|
PGID: "0"
|
|
|
|
MYSQL_ROOT_PASSWORD: "{{MYSQL_ROOT_PASSWORD}}"
|
|
|
|
TZ: "Australia/Brisbane"
|
|
|
|
volumes:
|
2024-09-10 22:09:43 +10:00
|
|
|
- "{{ data_folder }}/mariadb/config:/config"
|
2024-09-09 22:37:51 +10:00
|
|
|
|