Added Mariadb and wordpress

This commit is contained in:
tanshu committed 2022-08-02 06:41:22 +05:30
1 parent 5713d3d410
commit 4cfffeaebd
12 files changed
+505

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#################################################
# DO Community Playbooks: Docker
#################################################
---
- hosts: all
become: true
vars_files:
- vars/default.yml
tasks:
- name: Pull default Mariadb image
docker_image:
name: "{{ image_name }}"
source: pull
state: present
# Creates the number of containers defined by the variable create_containers, using values from vars file
- name: Create Mariadb container
docker_container:
name: "{{ container_name }}"
image: "{{ image_name }}"
state: started
restart_policy: "unless-stopped"
env:
MARIADB_ROOT_PASSWORD: "{{ db_password }}"
published_ports:
- 3306:3306
volumes:
- "{{ data_location }}:/var/lib/mysql"