feat: initial commit
This commit is contained in:
commit
718146cd88
15 changed files with 293 additions and 0 deletions
53
tasks/mariadb.yaml
Normal file
53
tasks/mariadb.yaml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
|
||||
# create mariadb data directory
|
||||
- name: "db - create mariadb directory"
|
||||
ansible.builtin.file:
|
||||
path: "/mnt/ipam/mysql"
|
||||
state: "directory"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0775"
|
||||
|
||||
# run mariadb container
|
||||
- name: "db - run mariadb container"
|
||||
community.docker.docker_container:
|
||||
|
||||
# docker defaults
|
||||
auto_remove: "no"
|
||||
container_default_behavior: "no_defaults"
|
||||
detach: "yes"
|
||||
init: "no"
|
||||
interactive: "no"
|
||||
log_driver: "json-file"
|
||||
log_options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
memory: "0"
|
||||
paused: "no"
|
||||
privileged: "no"
|
||||
pull: "always"
|
||||
read_only: "no"
|
||||
state: "started"
|
||||
tty: "no"
|
||||
|
||||
# run mariadb
|
||||
name: "ipam-db"
|
||||
image: "docker.io/mariadb:lts"
|
||||
image_name_mismatch: "recreate"
|
||||
restart_policy: "unless-stopped"
|
||||
networks:
|
||||
- name: "ipam-network"
|
||||
volumes:
|
||||
- "/mnt/ipam/mysql:/var/lib/mysql"
|
||||
|
||||
env:
|
||||
|
||||
# mariadb
|
||||
MARIADB_ROOT_PASSWORD: "{{ phpipam_db_root_password }}"
|
||||
MARIADB_DATABASE: "{{ phpipam_db_name }}"
|
||||
MARIADB_USER: "{{ phpipam_db_user }}"
|
||||
MARIADB_PASSWORD: "{{ phpipam_db_password }}"
|
||||
|
||||
# global
|
||||
TZ: "{{ timezone }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue