mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Added draft for mariadb docker role
This commit is contained in:
23
roles/docker-mariadb/tasks/main.yml
Normal file
23
roles/docker-mariadb/tasks/main.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
- name: Create Docker network for MariaDB
|
||||
docker_network:
|
||||
name: mariadb_network
|
||||
state: present
|
||||
when: run_once_backup_docker_to_local is not defined
|
||||
|
||||
- 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"
|
||||
when: run_once_backup_docker_to_local is not defined
|
||||
|
||||
- name: run the docker_mariadb tasks once
|
||||
set_fact:
|
||||
run_once_backup_docker_to_local: true
|
||||
when: run_once_backup_docker_to_local is not defined
|
Reference in New Issue
Block a user