mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-03 16:09:29 +00:00
Refactor DB initialization handling: externalize database_init flag for svc-db-mariadb and svc-db-postgres, remove internal auto-detection, and pass explicit init signal from sys-stk-back-stateful. Improves clarity, avoids incorrect credential lookups, and stabilizes central DB setup.
Reference: ChatGPT conversation https://chatgpt.com/share/692def1c-a79c-800f-b7dd-35e1845424bf
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
- name: Create Docker network for MariaDB
|
||||
community.docker.docker_network:
|
||||
name: "{{ mariadb_network_name }}"
|
||||
name: "{{ mariadb_network }}"
|
||||
state: present
|
||||
ipam_config:
|
||||
- subnet: "{{ mariadb_subnet }}"
|
||||
@@ -15,7 +15,7 @@
|
||||
MARIADB_ROOT_PASSWORD: "{{ mariadb_root_pwd }}"
|
||||
MARIADB_AUTO_UPGRADE: "1"
|
||||
networks:
|
||||
- name: "{{ mariadb_network_name }}"
|
||||
- name: "{{ mariadb_network }}"
|
||||
volumes:
|
||||
- "{{ mariadb_volume }}:/var/lib/mysql"
|
||||
published_ports:
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
- name: "Initialize database for '{{ database_name }}'"
|
||||
include_tasks: 02_init.yml
|
||||
when: "{{ mariadb_init }}"
|
||||
when: database_init | bool
|
||||
Reference in New Issue
Block a user