2023-02-06 17:50:05 +00:00
|
|
|
---
|
2024-09-21 09:10:09 +00:00
|
|
|
mariadb_version: "10.11.9"
|
2023-02-06 17:50:05 +00:00
|
|
|
mariadb_base_path: /var/lib/mariadb
|
2024-10-27 15:04:07 +00:00
|
|
|
mariadb_data_path: >-2
|
|
|
|
{{ mariadb_base_path }}/{{ mariadb_version | split('.') | first }}
|
|
|
|
mariadb_state: present
|
2023-02-06 17:50:05 +00:00
|
|
|
|
|
|
|
mariadb_root_password: ~
|
|
|
|
mariadb_database: ~
|
|
|
|
mariadb_username: ~
|
|
|
|
mariadb_password: ~
|
|
|
|
|
|
|
|
mariadb_container_base_environment:
|
|
|
|
MARIADB_ROOT_PASSWORD: "{{ mariadb_root_password }}"
|
|
|
|
mariadb_container_extra_environment: {}
|
|
|
|
|
2024-10-27 15:04:07 +00:00
|
|
|
mariadb_container_image_registry: docker.io
|
|
|
|
mariadb_container_image_namespace: ~
|
|
|
|
mariadb_container_image_name: mariadb
|
2023-02-06 17:50:05 +00:00
|
|
|
mariadb_container_image_tag: ~
|
2024-10-27 15:04:07 +00:00
|
|
|
mariadb_container_image: >-2
|
|
|
|
{{
|
|
|
|
([
|
|
|
|
mariadb_container_image_registry | default([], true),
|
|
|
|
mariadb_container_image_namespace | default([], true),
|
|
|
|
mariadb_container_image_name,
|
|
|
|
] | flatten | join('/'))
|
|
|
|
+ ':' + mariadb_container_image_tag | default(mariadb_version, true)
|
|
|
|
}}
|
|
|
|
mariadb_container_image_source: pull
|
|
|
|
mariadb_container_image_force_source: >-2
|
|
|
|
{{ mariadb_container_image_tag | default(false, true) | bool }}
|
|
|
|
|
|
|
|
mariadb_container_name: mariadb
|
2023-02-06 17:50:05 +00:00
|
|
|
mariadb_container_base_volumes:
|
|
|
|
- "{{ mariadb_data_path }}:{{ mariadb_container_data_path }}:z"
|
|
|
|
mariadb_container_extra_volumes: []
|
|
|
|
mariadb_container_base_labels:
|
|
|
|
version: "{{ mariadb_version }}"
|
|
|
|
mariadb_container_extra_labels: {}
|
|
|
|
mariadb_container_restart_policy: "unless-stopped"
|
|
|
|
mariadb_container_environment: >-2
|
|
|
|
{{ mariadb_container_base_environment
|
|
|
|
| combine(mariadb_container_database_environment
|
|
|
|
if (mariadb_database and mariadb_username and mariadb_password)
|
|
|
|
else {}, recursive=True)
|
|
|
|
| combine(mariadb_container_extra_environment) }}
|
2024-10-27 15:04:07 +00:00
|
|
|
mariadb_container_state: >-2
|
|
|
|
{{ (mariadb_state == 'present') | ternary('started', 'absent') }}
|