computer-playbook/roles/docker-mariadb/tasks/main.yml

23 lines
608 B
YAML
Raw Normal View History

2023-12-29 22:50:42 +01:00
- name: Create Docker network for MariaDB
docker_network:
name: mariadb_network
state: present
2023-12-29 23:48:44 +01:00
when: run_once_docker_mariadb is not defined
2023-12-29 22:50:42 +01:00
- name: install MariaDB
docker_container:
name: mariadb
image: mariadb:latest
detach: yes
env:
MARIADB_ROOT_PASSWORD: "{{central_mariadb_root_password}}"
networks:
- name: mariadb_network
published_ports:
- "127.0.0.1:3306:3306"
2023-12-29 23:48:44 +01:00
when: run_once_docker_mariadb is not defined
2023-12-29 22:50:42 +01:00
- name: run the docker_mariadb tasks once
set_fact:
2023-12-29 23:48:44 +01:00
run_once_docker_mariadb: true
when: run_once_docker_mariadb is not defined