databases/roles/mariadb/tasks/main.yml

21 lines
1013 B
YAML
Raw Normal View History

---
- name: Ensure mariadb container image '{{ mariadb_container_image }}' is {{ mariadb_state }}
community.docker.docker_image:
name: "{{ mariadb_container_image }}"
state: "{{ mariadb_state }}"
source: "{{ mariadb_container_image_source }}"
force_source: "{{ mariadb_container_image_force_source }}"
- name: Ensure mariadb container '{{ mariadb_container_name }}' is {{ mariadb_container_state }}
community.docker.docker_container:
name: "{{ mariadb_container_name }}"
image: "{{ mariadb_container_image }}"
env: "{{ mariadb_container_environment }}"
ports: "{{ mariadb_container_ports | default(omit, true) }}"
labels: "{{ mariadb_container_labels | default(omit, true) }}"
volumes: "{{ mariadb_container_volumes }}"
networks: "{{ mariadb_container_networks | default(omit, true) }}"
etc_hosts: "{{ mariadb_container_etc_hosts | default(omit, true) }}"
restart_policy: "{{ mariadb_container_restart_policy }}"
state: "{{ mariadb_container_state }}"