Implemented vars, tasks and templates for central database setup until mastodon role

This commit is contained in:
2024-01-02 21:13:34 +01:00
parent 4e09fbd3fb
commit ab7ca07ac9
76 changed files with 431 additions and 467 deletions

View File

@@ -1,19 +1,21 @@
- name: Create Docker network for MariaDB
docker_network:
name: mariadb_network
name: central_mariadb_network
state: present
when: run_once_docker_mariadb is not defined
- name: install MariaDB
docker_container:
name: mariadb
name: central-mariadb
image: mariadb:latest #could lead to problems with nextcloud
detach: yes
env:
MARIADB_ROOT_PASSWORD: "{{central_mariadb_root_password}}"
MARIADB_AUTO_UPGRADE: "1"
networks:
- name: mariadb_network
- name: central_mariadb_network
volumes:
- database:/var/lib/mysql
published_ports:
- "127.0.0.1:3306:3306"
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud