mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-09 02:45:17 +00:00
- Replace legacy docker_container-based MariaDB deployment with docker-compose based workflow - Add custom Dockerfile and docker-compose templates for MariaDB - Split MariaDB command into separate arguments to avoid entrypoint parsing errors - Introduce MARIADB_CUSTOM_IMAGE and MARIADB_EXPOSE_LOCAL variables - Add docker_compose_flush_handlers to ensure correct handler execution on first run - Replace utils/once/finalize.yml with utils/once/flag.yml for new run-once semantics - Align variable naming with Infinito.Nexus UPPERCASE conventions - Fix PostgreSQL custom image variable name (POSTGRES_CUSTOM_IMAGE_NAME → POSTGRES_CUSTOM_IMAGE) - Remove obsolete flush_handlers var injection in svc-db-postgres/tasks/main.yml - General cleanup after migration from Ansible 2.18 → 2.20 Conversation reference: https://chatgpt.com/share/69306c81-9934-800f-b317-f53a8f246a73
24 lines
781 B
YAML
24 lines
781 B
YAML
- name: "Setup docker network for {{ application_id }}"
|
|
include_tasks: "{{ [playbook_dir, 'roles/docker-compose/tasks/utils/network.yml' ] | path_join }}"
|
|
vars:
|
|
docker_network_name: "{{ MARIADB_NETWORK }}"
|
|
docker_network_subnet: "{{ MARIADB_SUBNET }}"
|
|
docker_compose_flush_handlers: true
|
|
|
|
- name: install python-mysqlclient
|
|
community.general.pacman:
|
|
name: python-mysqlclient
|
|
state: present
|
|
|
|
- name: "Wait until the MariaDB container with hostname '{{ MARIADB_NAME }}' is healthy"
|
|
community.docker.docker_container_info:
|
|
name: "{{ MARIADB_NAME }}"
|
|
register: db_info
|
|
until:
|
|
- db_info.container is defined
|
|
- db_info.container.State.Health.Status == "healthy"
|
|
retries: 30
|
|
delay: 5
|
|
|
|
- include_tasks: utils/once/flag.yml
|